Invoke handler when request is made to merge 2 people
This commit is contained in:
parent
7e0713e22b
commit
884b1e02a7
|
@ -33,7 +33,7 @@ import sqlalchemy as sa
|
||||||
from sqlalchemy import orm
|
from sqlalchemy import orm
|
||||||
|
|
||||||
from rattail.db import model, api
|
from rattail.db import model, api
|
||||||
from rattail.time import localtime, make_utc
|
from rattail.time import localtime
|
||||||
from rattail.util import OrderedDict
|
from rattail.util import OrderedDict
|
||||||
|
|
||||||
import colander
|
import colander
|
||||||
|
@ -730,12 +730,9 @@ class PersonView(MasterView):
|
||||||
"""
|
"""
|
||||||
Create a new merge request for the given 2 people.
|
Create a new merge request for the given 2 people.
|
||||||
"""
|
"""
|
||||||
merge = self.model.MergePeopleRequest()
|
self.handler.request_merge(self.request.user,
|
||||||
merge.removing_uuid = self.request.POST['removing_uuid']
|
self.request.POST['removing_uuid'],
|
||||||
merge.keeping_uuid = self.request.POST['keeping_uuid']
|
self.request.POST['keeping_uuid'])
|
||||||
merge.requested_by = self.request.user
|
|
||||||
merge.requested = make_utc()
|
|
||||||
self.Session.add(merge)
|
|
||||||
return self.redirect(self.get_index_url())
|
return self.redirect(self.get_index_url())
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|
Loading…
Reference in a new issue