Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow users to see their own expired sublets #275

Merged
merged 2 commits into from
Mar 24, 2024
Merged

Conversation

dr-Jess
Copy link
Contributor

@dr-Jess dr-Jess commented Mar 24, 2024

No description provided.

Copy link

codecov bot commented Mar 24, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 91.50%. Comparing base (0905840) to head (0c88556).

Files Patch % Lines
backend/sublet/views.py 75.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #275   +/-   ##
=======================================
  Coverage   91.50%   91.50%           
=======================================
  Files          60       60           
  Lines        2542     2543    +1     
=======================================
+ Hits         2326     2327    +1     
  Misses        216      216           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dr-Jess dr-Jess requested a review from vcai122 March 24, 2024 16:51
@@ -151,6 +152,8 @@ def list(self, request, *args, **kwargs):
queryset = queryset.filter(amenities__name=amenity)
if subletter.lower() == "true":
queryset = queryset.filter(subletter=request.user)
else:
queryset = queryset.filter(expires_at__gte=timezone.now())
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit this logic is slightly different so i would put it on top before all the other ifs.

@dr-Jess dr-Jess merged commit a4f5305 into master Mar 24, 2024
8 of 9 checks passed
@dr-Jess dr-Jess deleted the sublet-show-expired branch March 24, 2024 17:15
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants