Skip to content

Commit

Permalink
models:file - remove File.id
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoCampinoti94 committed Oct 30, 2023
1 parent d04414f commit c74876f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion acacore/models/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class Action(Enum):
class File(ACABase):
"""File data model."""

id: int = Field(primary_key=True) # noqa: A003
uuid: UUID4 = Field(primary_key=True)
checksum: str
puid: Optional[str]
Expand Down
2 changes: 0 additions & 2 deletions tests/test_database.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from hashlib import sha256
from pathlib import Path
from random import randint
from uuid import uuid4

import pytest
Expand All @@ -27,7 +26,6 @@ def test_file(test_files: Path, test_files_data: dict[str, dict]) -> File:
filename, filedata = next(iter(test_files_data.items()))
file: Path = test_files / filename
return File(
id=randint(1, 10000),
uuid=uuid4(),
checksum=sha256(file.read_bytes()).hexdigest(),
puid=filedata["matches"]["id"],
Expand Down

0 comments on commit c74876f

Please sign in to comment.