def save_model(self, request, obj, form, change): # only call create_envelope if the model is being added. if not change: create_envelope(instance=obj) obj.save() # only call add_asset_to_envelope when the model is being added. if not change: add_asset_to_envelope(instance=obj)
def add_to_envelope(instance): instance.ENVELOPE_ID = formset.instance.id add_asset_to_envelope(instance=instance)