def __init__(self, *args, **kwargs): if 'load_configuration' in kwargs: arg = kwargs['load_configuration'] if type(arg) != type(1): if type(arg) == type(True): if arg: kwargs['load_configuration'] = 1 else: kwargs['load_configuration'] = 0 # kwargs['load_configuration'] = 1 if arg else 0 else: raise VistrailsInternalError("Cannot convert " "load_configuration") DBPackage.__init__(self, *args, **kwargs) self.set_defaults()
def do_copy(self, new_ids=False, id_scope=None, id_remap=None): cp = DBPackage.do_copy(self, new_ids, id_scope, id_remap) cp.__class__ = Package cp.set_defaults(self)