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