only add peers with new id

This commit is contained in:
j 2015-11-29 15:56:25 +01:00
parent a44aba7b7d
commit 8756e51090

View file

@ -14,7 +14,7 @@ import settings
import state import state
import logging import logging
logger = logging.getLogger('oml.changelog') logger = logging.getLogger(__name__)
class Changelog(db.Model): class Changelog(db.Model):
''' '''
@ -242,6 +242,7 @@ class Changelog(db.Model):
return True return True
def action_addpeer(self, user, timestamp, peerid, username): def action_addpeer(self, user, timestamp, peerid, username):
if len(peerid) == 16:
from user.models import User from user.models import User
if not 'users' in user.info: if not 'users' in user.info:
user.info['users'] = {} user.info['users'] = {}