* conifer/syrup/views/sites.py: bugfix in join-this-site function.
authorgfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Sat, 2 Oct 2010 19:57:54 +0000 (19:57 +0000)
committergfawcett <gfawcett@6d9bc8c9-1ec2-4278-b937-99fde70a366f>
Sat, 2 Oct 2010 19:57:54 +0000 (19:57 +0000)
git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@1028 6d9bc8c9-1ec2-4278-b937-99fde70a366f

conifer/syrup/views/sites.py

index b06c20c..838f95e 100644 (file)
@@ -131,7 +131,8 @@ def site_join(request, site_id):
     elif request.method != 'POST':
         return g.render('site_join.xhtml', site=site)
     else:
+        group = models.Group.objects.get(site=site, external_id=None)
         mbr = models.Membership.objects.create(user=request.user,
-                                               site=site, role='STUDT')
+                                               group=group, role='STUDT')
         mbr.save()
         return HttpResponseRedirect(site.site_url())