Some more refactoring
Tests / test (push) Successful in 10s
Tests / lint (push) Successful in 11s

This commit is contained in:
2026-10-16 16:27:50 +02:00
parent ef1a65adeb
commit 5cea645062
9 changed files with 108 additions and 79 deletions
+1 -6
View File
@@ -1,6 +1,6 @@
from pydantic import Field, computed_field
from sqlalchemy import ForeignKey, String, UniqueConstraint
from sqlalchemy.orm import Mapped, Session, mapped_column, relationship
from sqlalchemy.orm import Mapped, mapped_column, relationship
from src.models.common import BaseModelDb, ExportBaseModel, hashify
@@ -54,8 +54,3 @@ class CategoryDb(BaseModelDb):
)
children = relationship("CategoryDb", back_populates="parent")
budgets = relationship("CategoryBudgetDb", back_populates="category")
def add_category(session: Session, category_name: str):
category = Category.from_str(category_name)
session.add(category)