05/06 Phase 2: fixed error 500 Internal Server Error

This commit is contained in:
2026-05-06 17:44:59 -04:00
parent 8da0c11290
commit d5847108db
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -111,4 +111,4 @@ def index():
stats=stats,
expiring_soon=expiring_soon,
now=now,
)
)
+4 -1
View File
@@ -163,6 +163,9 @@ class TenantBillingHistory(db.Model):
invoice_ref = db.Column(db.String(100), nullable=True)
recorded_by = db.Column(db.Integer, db.ForeignKey("system_users.id"),
nullable=True)
created_at = db.Column(db.DateTime, nullable=False,
default=lambda: __import__('datetime').datetime.now(
__import__('datetime').timezone.utc))
tenant = db.relationship("Tenant", back_populates="billing_history")
recorder = db.relationship("SystemUser")
@@ -272,4 +275,4 @@ class JWTBlocklist(db.Model):
default=lambda: datetime.now(timezone.utc))
def __repr__(self):
return f"<JWTBlocklist jti={self.jti}>"
return f"<JWTBlocklist jti={self.jti}>"