Fix user chech in events patch endpoint
This commit is contained in:
parent
d24e31af93
commit
828f4e4aec
|
@ -360,7 +360,7 @@ async def partial_update_event(
|
|||
detail="Event with given id doesn't exist",
|
||||
)
|
||||
|
||||
if cast(User, event.user).id != user:
|
||||
if cast(User, event.user).id != user.id:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_403_FORBIDDEN,
|
||||
detail="You can only access your own events",
|
||||
|
|
Loading…
Reference in a new issue