From c3fe5dad79beddc5b32eb8e32c9c7b96634329c6 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Sun, 22 Dec 2024 22:26:09 +0100 Subject: [PATCH] fix tags --- app/routers/events.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/routers/events.py b/app/routers/events.py index 471fd04..be23335 100644 --- a/app/routers/events.py +++ b/app/routers/events.py @@ -351,10 +351,10 @@ async def update_events(authorize: Annotated[bool, Depends(permissions_checker.P event.longitude = eventSingle.longitude event.imgUrl = eventSingle.imgUrl event.tags = eventSingle.tags - for tag_name in eventSingle: + for tag_name in eventSingle.tags: tag = tags_repository.find_one_by({"name": {'$eq': tag_name}}) if tag is None: - tag = Tags(name=tag_name) + tag = tags.Tags(name=tag_name) tags_repository.save(tag) event.status = 1 event.created_at = datetime.today() -- 2.47.1