konova/intervention/forms/modals/document.py
mpeltriaux e26fc7fae1 Fixing broken document migration
* adds changes to document migration to correctly migrate documents
2022-12-02 12:57:18 +01:00

31 lines
772 B
Python

"""
Author: Michel Peltriaux
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
Contact: ksp-servicestelle@sgdnord.rlp.de
Created on: 18.08.22
"""
from intervention.models import InterventionDocument
from konova.forms.modals import NewDocumentModalForm
class NewInterventionDocumentModalForm(NewDocumentModalForm):
document_model = InterventionDocument
def save(self, *args, **kwargs):
""" Extension of regular NewDocumentModalForm
Checks whether payments exist on the intervention and sends the data to EGON
Args:
*args ():
**kwargs ():
Returns:
"""
doc = super().save(*args, **kwargs)
self.instance.send_data_to_egon()
return doc