refactor: Add load_from_db attribute to SecretStrInput class

The code changes in inputs.py add a new attribute `load_from_db` to the `SecretStrInput` class. This attribute controls whether the input should be loaded from the database or not. By default, it is set to `True`. This refactor improves the flexibility and configurability of the code.
This commit is contained in:
ogabrielluiz 2024-06-18 23:07:00 -03:00
commit 86bdb23865

View file

@ -190,6 +190,7 @@ class SecretStrInput(BaseInputMixin, DatabaseLoadMixin):
field_type: Optional[SerializableFieldTypes] = FieldTypes.PASSWORD
password: CoalesceBool = Field(default=True)
input_types: list[str] = []
load_from_db: CoalesceBool = True
class IntInput(BaseInputMixin, ListableInputMixin, RangeMixin):