keep two different counts in deputies
This commit is contained in:
parent
29d0ac3275
commit
1c3baa46c9
|
@ -475,6 +475,8 @@ class SyncFromPcfDbView(BrowserView):
|
|||
notify(ObjectModifiedEvent(object))
|
||||
self.publish(object)
|
||||
|
||||
previous_count = count
|
||||
|
||||
# currently active deputies
|
||||
cursor.execute('''SELECT t_pers.id, t_pers.nom, prenom, sexe, datenaiss,
|
||||
t_pers.addrpriv, t_pers.addrprof1, t_pers.addrprof2,
|
||||
|
@ -490,6 +492,7 @@ class SyncFromPcfDbView(BrowserView):
|
|||
t_parl.arrond = t_arrond.id
|
||||
%s''' % where_ts)
|
||||
|
||||
count = 0
|
||||
polgroup_ids = {}
|
||||
while True:
|
||||
row = cursor.fetchone()
|
||||
|
@ -519,7 +522,7 @@ class SyncFromPcfDbView(BrowserView):
|
|||
self.publish(object)
|
||||
|
||||
cursor.close()
|
||||
return count
|
||||
return '%s|%s' % (count, previous_count)
|
||||
|
||||
def set_person_functions(self, object, pers):
|
||||
cursor = self.db_connection.cursor()
|
||||
|
|
Reference in New Issue