cleaned up code around json, *locn -> transitioned to top, right, bottom, left to finally fix ORM replacing [ with { <- FIXES BUG-108

This commit is contained in:
2022-12-23 16:18:27 +11:00
parent 81fea4f6f3
commit 2a1e2d7d5d
8 changed files with 12 additions and 31 deletions

View File

@@ -45,16 +45,6 @@ class Settings(db.Model):
def __repr__(self):
return f"<id: {self.id}, import_path: {self.import_path}, storage_path: {self.storage_path}, recycle_bin_path: {self.recycle_bin_path}, auto_rotate: {self.auto_rotate}, default_refimg_model: {self.default_refimg_model}, default_scan_model: {self.default_scan_model}, default_threshold: {self.default_threshold}, face_size_limit: {self.face_size_limit}, scheduled_import_scan:{self.scheduled_import_scan}, scheduled_storage_scan: {self.scheduled_storage_scan}, scheduled_bin_cleanup: {self.scheduled_bin_cleanup}, bin_cleanup_file_age: {self.bin_cleanup_file_age}, job_archive_age: {self.job_archive_age}>"
################################################################################
# Helper class that inherits a .dump() method to turn class Settings into json / useful in jinja2
################################################################################
class SettingsSchema(ma.SQLAlchemyAutoSchema):
class Meta:
model = Settings
ordered = True
settings_schema = SettingsSchema(many=True)
################################################################################
# Helper class that defines a form for Settings, used to make html <form>
# with field validation (via wtforms)