Skip to content

Commit

Permalink
Fixup. Format code with Black
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Mar 14, 2024
1 parent b931a94 commit 83fc7dc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
16 changes: 10 additions & 6 deletions pod/meeting/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,11 @@ def test_meeting_TestView_get_request(self):
list_id = [meeting.id for meeting in response.context["meetings"]]
self.assertEqual(
list_id,
list(self.user.owner_meeting.all().values_list(
"id", flat=True
).order_by("-is_personal", "-start_at")),
list(
self.user.owner_meeting.all()
.values_list("id", flat=True)
.order_by("-is_personal", "-start_at")
),
)
print(" ---> test_meeting_TestView_get_request of meeting_TestView: OK!")

Expand All @@ -71,9 +73,11 @@ def test_meeting_TestView_get_request_restrict(self):
list_id = [meeting.id for meeting in response.context["meetings"]]
self.assertEqual(
list_id,
list(self.user.owner_meeting.all().values_list(
"id", flat=True
).order_by("-is_personal", "-start_at")),
list(
self.user.owner_meeting.all()
.values_list("id", flat=True)
.order_by("-is_personal", "-start_at")
),
)
print(
" ---> test_meeting_TestView_get_request_restrict ",
Expand Down
12 changes: 5 additions & 7 deletions pod/meeting/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ def my_meetings(request):
meetings = [
meeting
for meeting in (
request.user.owner_meeting.all().filter(
site=site
) | request.user.owners_meetings.all().filter(site=site)
request.user.owner_meeting.all().filter(site=site)
| request.user.owners_meetings.all()
.filter(site=site)
.order_by("-is_personal", "-start_at")
)
if meeting.is_active
Expand All @@ -144,9 +144,7 @@ def manage_personal_meeting_room(request):
"""
site = get_current_site(request)
personal_meeting_room = Meeting.objects.filter(
owner=request.user,
site=site,
is_personal=True
owner=request.user, site=site, is_personal=True
).first()

if not personal_meeting_room:
Expand All @@ -159,7 +157,7 @@ def manage_personal_meeting_room(request):
moderator_password=get_random_string(8),
start_at=datetime.now().replace(minute=0, second=0, microsecond=0),
recurrence=None,
is_personal=True
is_personal=True,
)


Expand Down

0 comments on commit 83fc7dc

Please sign in to comment.