mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-04 11:28:24 -04:00
Stop updating old column and return new column for .status
This commit is contained in:
@@ -819,12 +819,11 @@ class Notification(db.Model):
|
|||||||
|
|
||||||
@hybrid_property
|
@hybrid_property
|
||||||
def status(self):
|
def status(self):
|
||||||
return self._status_enum
|
return self._status_fkey
|
||||||
|
|
||||||
@status.setter
|
@status.setter
|
||||||
def status(self, status):
|
def status(self, status):
|
||||||
self._status_fkey = status
|
self._status_fkey = status
|
||||||
self._status_enum = status
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def personalisation(self):
|
def personalisation(self):
|
||||||
@@ -1030,12 +1029,11 @@ class NotificationHistory(db.Model, HistoryModel):
|
|||||||
|
|
||||||
@hybrid_property
|
@hybrid_property
|
||||||
def status(self):
|
def status(self):
|
||||||
return self._status_enum
|
return self._status_fkey
|
||||||
|
|
||||||
@status.setter
|
@status.setter
|
||||||
def status(self, status):
|
def status(self, status):
|
||||||
self._status_fkey = status
|
self._status_fkey = status
|
||||||
self._status_enum = status
|
|
||||||
|
|
||||||
|
|
||||||
INVITED_USER_STATUS_TYPES = ['pending', 'accepted', 'cancelled']
|
INVITED_USER_STATUS_TYPES = ['pending', 'accepted', 'cancelled']
|
||||||
|
|||||||
Reference in New Issue
Block a user