summaryrefslogtreecommitdiffstats
path: root/welco/qualif/models.py
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2015-10-09 12:59:29 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2015-10-10 16:24:21 (GMT)
commit80909756faa9895cb1a439d85e5322edde3d39fa (patch)
treef7a7dbb99e0d160d4afe4367bb02fad26c47deb7 /welco/qualif/models.py
parent30e1c9cc4326d5256a006ebe7be895f1725a6cb3 (diff)
downloadwelco-80909756faa9895cb1a439d85e5322edde3d39fa.zip
welco-80909756faa9895cb1a439d85e5322edde3d39fa.tar.gz
welco-80909756faa9895cb1a439d85e5322edde3d39fa.tar.bz2
general: redo submission, support for dgs & dga screen for alfortville
Diffstat (limited to 'welco/qualif/models.py')
-rw-r--r--welco/qualif/models.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/welco/qualif/models.py b/welco/qualif/models.py
index ecd3c37..0bb8e97 100644
--- a/welco/qualif/models.py
+++ b/welco/qualif/models.py
@@ -32,15 +32,16 @@ class Association(models.Model):
formdef_reference = models.CharField(max_length=250, null=True)
formdata_id = models.CharField(max_length=250, null=True)
- def push(self, request, context):
+ def push(self, request, context=None):
# push validated request to wcs
if context:
context = context.copy()
- context['user_id'] = self.user_id
+ else:
+ context = {}
+ context['user_id'] = self.source.contact_id
- if self.formdef_reference:
- self.formdata_id = push_wcs_formdata(request, self.formdef_reference, context)
- self.save()
+ self.formdata_id = push_wcs_formdata(request, self.formdef_reference, context)
+ self.save()
@property
def formdef_name(self):