misc: remove old digest migrations (#73775)
This commit is contained in:
parent
ef9fad625d
commit
aa6ce7c35d
|
@ -333,14 +333,6 @@ class FormData(StorableObject):
|
||||||
self.submission_agent_id = str(self.submission_context.get('agent_id'))
|
self.submission_agent_id = str(self.submission_context.get('agent_id'))
|
||||||
changed = True
|
changed = True
|
||||||
|
|
||||||
if 'digest' in self.__dict__: # 2021-06-24
|
|
||||||
# migration from a simple digest to digests
|
|
||||||
if not self.digests:
|
|
||||||
self.digests = {}
|
|
||||||
self.digests['default'] = self.__dict__['digest']
|
|
||||||
del self.__dict__['digest']
|
|
||||||
changed = True
|
|
||||||
|
|
||||||
if changed:
|
if changed:
|
||||||
self.store()
|
self.store()
|
||||||
|
|
||||||
|
|
|
@ -225,14 +225,6 @@ class FormDef(StorableObject):
|
||||||
# don't run migration on lightweight objects
|
# don't run migration on lightweight objects
|
||||||
return
|
return
|
||||||
|
|
||||||
if 'digest_template' in self.__dict__:
|
|
||||||
# 2021-06-22 - migration from a simple template to templates
|
|
||||||
if not self.digest_templates:
|
|
||||||
self.digest_templates = {}
|
|
||||||
self.digest_templates['default'] = self.__dict__['digest_template']
|
|
||||||
del self.__dict__['digest_template']
|
|
||||||
changed = True
|
|
||||||
|
|
||||||
if self.max_field_id is None and self.fields:
|
if self.max_field_id is None and self.fields:
|
||||||
self.max_field_id = max(lax_int(x.id) for x in self.fields)
|
self.max_field_id = max(lax_int(x.id) for x in self.fields)
|
||||||
changed = True
|
changed = True
|
||||||
|
|
Loading…
Reference in New Issue