fix tags #38
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user