]> git.ipfire.org Git - dbl.git/commitdiff
reports: Include the URL to the report in the API response
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 10 Mar 2026 14:51:42 +0000 (14:51 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 10 Mar 2026 14:51:42 +0000 (14:51 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/dbl/reports.py

index d3c2794302f4d1e60562f692142e4c02de60b2a7..b48d7d40fad50661850c61b7c92f645f596daf27 100644 (file)
@@ -502,8 +502,9 @@ class Report(sqlmodel.SQLModel, database.BackendMixin, table=True):
 
        # URL
 
+       @pydantic.computed_field
        @property
-       def url(self):
+       def url(self) -> str:
                return "https://www.ipfire.org/dbl/reports/%s" % self.id
 
        # Comments