Beispiel #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)
Beispiel #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)
Beispiel #3
0
 def add_to_envelope(instance):
     instance.ENVELOPE_ID = formset.instance.id
     add_asset_to_envelope(instance=instance)
Beispiel #4
0
 def add_to_envelope(instance):
     instance.ENVELOPE_ID = formset.instance.id
     add_asset_to_envelope(instance=instance)