mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 03:07:53 -06:00
Fix look for string in enum-type.
CURA-8473
This commit is contained in:
parent
ecf820f3db
commit
3061490675
1 changed files with 1 additions and 1 deletions
|
@ -10,6 +10,6 @@ def getBackwardsCompatibleMessage(text: str, title: str, lifetime: int, message_
|
||||||
return Message(text=text, title=title, lifetime=lifetime)
|
return Message(text=text, title=title, lifetime=lifetime)
|
||||||
else:
|
else:
|
||||||
message_type = Message.MessageType.NEUTRAL
|
message_type = Message.MessageType.NEUTRAL
|
||||||
if message_type in Message.MessageType:
|
if ("MessageType." + message_type_str) in [str(item) for item in Message.MessageType]:
|
||||||
message_type = Message.MessageType[message_type_str]
|
message_type = Message.MessageType[message_type_str]
|
||||||
return Message(text=text, title=title, lifetime=lifetime, message_type=message_type)
|
return Message(text=text, title=title, lifetime=lifetime, message_type=message_type)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue