summaryrefslogtreecommitdiffstats
path: root/welco/qualif/models.py
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2015-09-29 16:05:27 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2015-10-01 20:06:32 (GMT)
commit414162b52f7924191538fb7063a37c92c9c63e92 (patch)
tree40fd5b641fbba82fbd3a3742ea91718390bd059e /welco/qualif/models.py
parentbdce2a3e9925e724c948615dba7a5ac20119f721 (diff)
downloadwelco-414162b52f7924191538fb7063a37c92c9c63e92.zip
welco-414162b52f7924191538fb7063a37c92c9c63e92.tar.gz
welco-414162b52f7924191538fb7063a37c92c9c63e92.tar.bz2
general: make it possible to qualify with an user (#8173)
Diffstat (limited to 'welco/qualif/models.py')
-rw-r--r--welco/qualif/models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/welco/qualif/models.py b/welco/qualif/models.py
index b7e2e12..5373314 100644
--- a/welco/qualif/models.py
+++ b/welco/qualif/models.py
@@ -52,12 +52,16 @@ class Association(models.Model):
source = generic.GenericForeignKey('source_type', 'source_pk')
triaged = models.BooleanField(default=False)
comments = models.TextField(blank=True, verbose_name=_('Comments'))
+ user_id = models.CharField(max_length=50, null=True)
formdefs = models.ManyToManyField(FormdefReference)
formdatas = models.ManyToManyField(FormdataReference)
def push(self, request, context):
# push validated request to wcs
+ if context:
+ context = context.copy()
+ context['user_id'] = self.user_id
for formdef in self.formdefs.all():
formdata_id = push_wcs_formdata(request, formdef.reference, context)
reference = '%s:%s' % (formdef.reference, formdata_id)