general: don't wipe formdefs when wiping carddefs (#45303)

This commit is contained in:
Frédéric Péters 2020-07-21 10:04:45 +02:00
parent 3ca2d56840
commit c68aa20545
2 changed files with 9 additions and 7 deletions

View File

@ -73,11 +73,9 @@ class CardDef(FormDef):
return sql.get_carddef_new_id(id_start=id_start)
@classmethod
def wipe(cls):
super(CardDef, cls).wipe()
if get_publisher().is_using_postgresql():
from . import sql
sql.carddef_wipe()
def sql_wipe(cls):
from . import sql
sql.carddef_wipe()
@classmethod
def get_default_workflow(cls):

View File

@ -358,8 +358,12 @@ class FormDef(StorableObject):
def wipe(cls):
super(FormDef, cls).wipe()
if get_publisher().is_using_postgresql():
from . import sql
sql.formdef_wipe()
cls.sql_wipe()
@classmethod
def sql_wipe(cls):
from . import sql
sql.formdef_wipe()
def store(self):
if self.url_name is None: