From 8632fb67ad44582f283da63d05f3e7b8a2b57f12 Mon Sep 17 00:00:00 2001 From: Davide Alberani Date: Sun, 26 Apr 2015 09:36:45 +0200 Subject: [PATCH] extract person_id, if missing --- eventman_server.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eventman_server.py b/eventman_server.py index 601bf7c..77f509e 100755 --- a/eventman_server.py +++ b/eventman_server.py @@ -360,6 +360,8 @@ class EventsHandler(CollectionHandler): new_person_data = self._get_person_data(person_id or self.arguments, doc.get('persons') or []) env = self._dict2env(new_person_data) + if person_id is None: + person_id = new_person_data.get('person_id') env.update({'PERSON_ID': person_id, 'EVENT_ID': id_, 'EVENT_TITLE': doc.get('title', '')}) stdin_data = {'old': old_person_data, 'new': new_person_data,