diff --git a/memberportal/access/models.py b/memberportal/access/models.py index 57d3e8e4..6bfcbcc2 100644 --- a/memberportal/access/models.py +++ b/memberportal/access/models.py @@ -90,16 +90,14 @@ def __str__(self): def log_access(self, member_id, success=True): pass - def log_event(self, description=None, event_type=None, data=None): + def log_event(self, description=None, data=None): if self.type == "door": - log_event( - description=description, event_type=event_type, data=data, door=self - ) + log_event(description=description, event_type="door", data=data, door=self) return True elif self.type == "interlock": log_event( description=description, - event_type=event_type, + event_type="interlock", data=data, interlock=self, ) @@ -107,7 +105,7 @@ def log_event(self, description=None, event_type=None, data=None): elif self.type == "memberbucks": log_event( description=description, - event_type=event_type, + event_type="memberbucksdevice", data=data, memberbucks_device=self, ) diff --git a/memberportal/profile/models.py b/memberportal/profile/models.py index ae82359f..3dfc7810 100644 --- a/memberportal/profile/models.py +++ b/memberportal/profile/models.py @@ -90,7 +90,7 @@ def log_event( ): EventLog( description=description, - logtype=event_type, + logtype="generic" if event_type is None else event_type, data=data, door=door, interlock=interlock,