Jelajahi Sumber

refactor(moderator-service): ensure actor_user_id and user_id are same type in _assert_not_self

Librellium 13 jam lalu
induk
melakukan
1a3dbcba00
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      anonflow/services/moderator/service.py

+ 1 - 1
anonflow/services/moderator/service.py

@@ -25,7 +25,7 @@ class ModeratorService:
 
     @staticmethod
     def _assert_not_self(actor_user_id: int, user_id: int):
-        if actor_user_id == user_id:
+        if int(actor_user_id) == int(user_id):
             raise SelfActionError(
                 f"Moderator user_id={actor_user_id} cannot perform this action on themselves, target user_id={user_id}"
             )