Draft: migrate DraftText type to Text
This commit is contained in:
@@ -125,8 +125,18 @@ class DraftAnnotation(object):
|
||||
"""
|
||||
if state:
|
||||
if isinstance(state, dict) and ("Type" in state):
|
||||
# During the migration of the classes
|
||||
# the 'DraftText' type was changed to 'Text' type
|
||||
if state["Type"] == "DraftText":
|
||||
state["Type"] = "Text"
|
||||
_info = "migrate 'DraftText' type to 'Text'"
|
||||
_wrn("v0.19, " + _tr(_info))
|
||||
self.Type = state["Type"]
|
||||
else:
|
||||
if state == "DraftText":
|
||||
state = "Text"
|
||||
_info = "migrate 'DraftText' type to 'Text'"
|
||||
_wrn("v0.19, " + _tr(_info))
|
||||
self.Type = state
|
||||
|
||||
def execute(self, obj):
|
||||
|
||||
Reference in New Issue
Block a user