Fix: Login.

This commit is contained in:
2026-03-15 19:52:21 +00:00
parent e8e9a02e7b
commit 97dccafc05
80 changed files with 1475 additions and 536 deletions

View File

@@ -1,7 +1,7 @@
"""
Project: PARTS Website
Project: Magic Tracker
Author: Edward Middleton-Smith
Precision And Research Technology Systems Limited
Shuffle & Skirmish
Technology: Business Objects
Feature: Statistic Business Object
@@ -17,7 +17,7 @@ from helpers.helper_app import Helper_App
from dataclasses import dataclass
from typing import ClassVar
from sqlalchemy import Uuid, Interval
from sqlalchemy.types import Text, Boolean
from sqlalchemy.types import Text, Boolean, Integer
class Statistic(SQLAlchemy_ABC, Base):
@@ -231,6 +231,7 @@ class Statistic_Temp(db.Model, Base):
class Parameters_Statistic(Get_Many_Parameters_Base):
access_user_id: int
get_all_statistic: bool
get_inactive_statistic: bool
statistic_ids: str
@@ -240,9 +241,10 @@ class Parameters_Statistic(Get_Many_Parameters_Base):
require_any_id_filters_met: bool
@classmethod
def get_default(cls):
def get_default(cls, user_id_session):
return cls(
get_all_statistic = True
access_user_id = user_id_session
, get_all_statistic = True
, get_inactive_statistic = False
, statistic_ids = ''
, entity_type_codes = ''
@@ -254,7 +256,8 @@ class Parameters_Statistic(Get_Many_Parameters_Base):
@classmethod
def from_json(cls, json):
return cls(
get_all_statistic = json.get('a_get_all_statistic', False)
access_user_id = json.get('a_access_user_id', None)
, get_all_statistic = json.get('a_get_all_statistic', False)
, get_inactive_statistic = json.get('a_get_inactive_statistic', False)
, statistic_ids = json.get('a_statistic_ids', '')
, entity_type_codes = json.get('a_entity_type_codes', '')
@@ -265,7 +268,8 @@ class Parameters_Statistic(Get_Many_Parameters_Base):
def to_json(self):
return {
'a_get_all_statistic': self.get_all_statistic
'a_access_user_id': self.access_user_id
, 'a_get_all_statistic': self.get_all_statistic
, 'a_get_inactive_statistic': self.get_inactive_statistic
, 'a_statistic_ids': self.statistic_ids
, 'a_entity_type_codes': self.entity_type_codes
@@ -277,7 +281,8 @@ class Parameters_Statistic(Get_Many_Parameters_Base):
@staticmethod
def get_type_hints():
return {
'a_get_all_statistic': Boolean
'a_access_user_id': Integer
, 'a_get_all_statistic': Boolean
, 'a_get_inactive_statistic': Boolean
, 'a_statistic_ids': Text
, 'a_entity_type_codes': Text