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:
10
settings.py
10
settings.py
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user