[datafeed] Commit after all deletions in datafeed parser
This avoids misleading validation error because schema constraints could be
temporarily broken depending on the deletion order.
Closes #4372127.
--- a/server/sources/datafeed.py Wed Sep 10 21:28:33 2014 +0200
+++ b/server/sources/datafeed.py Thu Sep 18 11:03:39 2014 +0200
@@ -381,7 +381,7 @@
self.warning('delete %s %s entities', len(eids), etype)
cnx.execute('DELETE %s X WHERE X eid IN (%s)'
% (etype, ','.join(eids)))
- cnx.commit()
+ cnx.commit()
def update_if_necessary(self, entity, attrs):
entity.complete(tuple(attrs))