Fixed requirement of html_input_type in config

This commit is contained in:
Candifloss 2025-03-13 10:31:03 +05:30
parent de12a966d8
commit 71a3d957b1
2 changed files with 1 additions and 6 deletions

View File

@ -14,7 +14,6 @@ item_attributes = [
textAttribute(
attrib_name="assettag",
display_name="Asset Tag",
html_input_type="text",
required=True,
unique=True,
primary=True,
@ -24,7 +23,6 @@ item_attributes = [
textAttribute(
attrib_name="hostname",
display_name="Host Name",
html_input_type="text",
required=True,
unique=True,
allowed_chars="abcdefghijklmnopqrstuvwxyz0123456789.-_", # Lowercase letters, numbers, dots, underscores, hyphens
@ -32,14 +30,12 @@ item_attributes = [
dateAttribute(
attrib_name="warrantyfrom",
display_name="Warranty From",
html_input_type="date",
default_val="2020-03-09",
required=True
),
selectAttribute(
attrib_name="status",
display_name="Status",
html_input_type="select",
required=True,
options=["Active", "Inactive"], # Allowed values
default_val="Active"
@ -47,7 +43,6 @@ item_attributes = [
intAttribute(
attrib_name="staffnum",
display_name="Staff No.",
html_input_type="number",
required=True,
min_val=100000, # 6 digits
max_val=99999999, # 8 digits

View File

@ -10,7 +10,7 @@ class Attribute:
"""Base class for all attribute types."""
attrib_name: str
display_name: str
html_input_type: str
html_input_type: Optional[str] = "text"
required: bool = False
unique: bool = False
primary: bool = False