Invoke handler when request is made to merge 2 people

This commit is contained in:
Lance Edgar 2021-09-15 19:01:53 -05:00
parent 7e0713e22b
commit 884b1e02a7

View file

@ -33,7 +33,7 @@ import sqlalchemy as sa
from sqlalchemy import orm
from rattail.db import model, api
from rattail.time import localtime, make_utc
from rattail.time import localtime
from rattail.util import OrderedDict
import colander
@ -730,12 +730,9 @@ class PersonView(MasterView):
"""
Create a new merge request for the given 2 people.
"""
merge = self.model.MergePeopleRequest()
merge.removing_uuid = self.request.POST['removing_uuid']
merge.keeping_uuid = self.request.POST['keeping_uuid']
merge.requested_by = self.request.user
merge.requested = make_utc()
self.Session.add(merge)
self.handler.request_merge(self.request.user,
self.request.POST['removing_uuid'],
self.request.POST['keeping_uuid'])
return self.redirect(self.get_index_url())
@classmethod