mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 04:26:05 +08:00
Fix look for string in enum-type.
CURA-8473
This commit is contained in:
parent
ecf820f3db
commit
3061490675
@ -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…
x
Reference in New Issue
Block a user