mirror of
https://github.com/ae-utbm/sith.git
synced 2025-05-05 00:54:06 +00:00
fix club edition page
This commit is contained in:
parent
8699750c72
commit
c527e87fd1
@ -27,7 +27,7 @@
|
||||
</p>
|
||||
<fieldset class="required margin-bottom">
|
||||
{% for field_name in form.admin_fields %}
|
||||
{% set field = form.pop(field_name) %}
|
||||
{% set field = form[field_name] %}
|
||||
<div class="form-group">
|
||||
{{ field.errors }}
|
||||
{{ field.label_tag() }}
|
||||
|
@ -918,3 +918,14 @@ def test_club_board_member_cannot_edit_club_properties(client: Client):
|
||||
assert club.name == "old name"
|
||||
assert club.is_active
|
||||
assert club.address == "new address"
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
def test_edit_club_page_doesnt_crash(client: Client):
|
||||
"""crash test for club:club_edit"""
|
||||
club = baker.make(Club)
|
||||
user = subscriber_user.make()
|
||||
baker.make(Membership, club=club, user=user, role=3)
|
||||
client.force_login(user)
|
||||
res = client.get(reverse("club:club_edit", kwargs={"club_id": club.id}))
|
||||
assert res.status_code == 200
|
||||
|
Loading…
x
Reference in New Issue
Block a user