Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions dreadnode/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ def _validate_key(key: str) -> str:
"""Validate that a key only contains alphanumeric characters and dashes."""
pattern = r"^(?=.{3,100}$)[a-z0-9]+(?:-[a-z0-9]+)*$"
if not bool(re.match(pattern, key)):
raise ValidationError(
detail="Key can only contain lowercase alphanumeric characters and dashes."
)
raise ValidationError("Key can only contain lowercase alphanumeric characters and dashes.")
return key


Expand Down Expand Up @@ -581,7 +579,6 @@ class DatasetMetadata(BaseModel):
)
created_at: datetime = Field(..., description="Creation timestamp")
updated_at: datetime = Field(..., description="Last update timestamp")
is_public: bool = Field(..., description="Whether the dataset is public")


class CreateDatasetRequest(BaseModel):
Expand Down
Loading