only add peers with new id
This commit is contained in:
parent
a44aba7b7d
commit
8756e51090
1 changed files with 12 additions and 11 deletions
|
@ -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'] = {}
|
||||||
|
|
Loading…
Reference in a new issue