fix actions

This commit is contained in:
CHIEFSOFT\ameye
2025-11-16 14:25:42 -05:00
parent 6545e5b94c
commit c2e29dd93f
6 changed files with 78 additions and 9 deletions
+18
View File
@@ -47,6 +47,24 @@ class ProvisionActions(db.Model):
return provision_action
@classmethod
def get_provision_action_calendar_member_id(cls, member_id, limit):
provision_action = cls.query.all()
provision_action = cls.query.filter_by(member_id=member_id).limit(limit).all()
if not provision_action:
return None
return provision_action
# '''
# merms_panel=# select * from provision_actions limit 2;
# id | uid | member_id | product_uid | action | added
# ----+--------------------------------------+-----------+--------------------------------------+-------------------------------+----------------------------
# 1 | 8b7db9fb-1404-4505-9858-7f418a6ae416 | 1 | df5bc060-18e0-4546-ae9a-89f7436f7cff | Allocating Provisioning Ports | 2025-07-12 21:21:02.036093
# 2 | d0e0fe16-4e0f-4cdc-856e-d8cfeb6c673f | 1 | 58645ef9-e334-45e0-8ce1-8ec637a20c50 | Allocating Provisioning Ports | 2025-07-13 15:02:04.388589
# (2 rows)
#
# '''
def to_dict(self):
"""
Convert the Loan object to a dictionary format for JSON serialization.