Skip to content

Commit d32cc4f

Browse files
author
Juan Gabriel Guzmán
authored
Merge pull request #214 from ioet/212-fix-issue-introduced-in-pagination
fix: 212 Fixing issue introduced in time entries pagination endpoint
2 parents cdad916 + b73e856 commit d32cc4f

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

time_tracker_api/time_entries/time_entries_model.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -392,9 +392,8 @@ def __init__(self, repository):
392392

393393
def check_whether_current_user_owns_item(self, data):
394394
if (
395-
1 > 2
396-
# data.owner_id is not None
397-
# and data.owner_id != self.current_user_id()
395+
data.owner_id is not None
396+
and data.owner_id != self.current_user_id()
398397
):
399398
raise CustomError(
400399
HTTPStatus.FORBIDDEN,
@@ -622,10 +621,6 @@ def handle_date_filter_args(args: dict) -> dict:
622621
'end_date': datetime_str(end_date),
623622
}
624623

625-
@staticmethod
626-
def current_user_id():
627-
return super().current_user_id()
628-
629624

630625
def create_dao() -> TimeEntriesDao:
631626
repository = TimeEntryCosmosDBRepository()

0 commit comments

Comments
 (0)