Commit 10f56a81 authored by Antoine Millet's avatar Antoine Millet
Browse files

Fixed race condition in account update

parent c8117fe8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -130,7 +130,7 @@ class CCServer(object):
        """ Update the database with accounts.
        """

        db_accounts = set((obj['a'].value for obj in self.db.objects if 'a' in obj))
        db_accounts = set((obj['a'].value for obj in list(self.db.objects) if 'a' in obj))
        accounts = set(self.conf.list_accounts())

        to_register = accounts - db_accounts