Fixed dying when a person was already in premises.

pull/1/head
Stanislaw Klekot 2014-06-08 00:06:38 +02:00
rodzic 101f5d28b5
commit fca4585335
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -11,7 +11,8 @@ from models import Person
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
def person_enter(nick): def person_enter(nick):
Person(nick).save() if Person.objects.filter(nick = nick).count() == 0:
Person(nick).save() # add if not exists
def person_leave(nick): def person_leave(nick):
Person(nick).delete() Person(nick).delete()