Esempio n. 1
0
    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)
Esempio n. 2
0
    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)
Esempio n. 3
0
 def add_to_envelope(instance):
     instance.ENVELOPE_ID = formset.instance.id
     add_asset_to_envelope(instance=instance)
Esempio n. 4
0
 def add_to_envelope(instance):
     instance.ENVELOPE_ID = formset.instance.id
     add_asset_to_envelope(instance=instance)