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()