Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appointment/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
__url__ = "https://github.com/adamspd/django-appointment"
__package_website__ = "https://django-appt.adamspierredavid.com/"
__package_doc_url__ = "https://django-appt-doc.adamspierredavid.com/"
__version__ = "3.9.2b0"
__version__ = "3.9.3b2"
__test_version__ = True
4 changes: 0 additions & 4 deletions appointment/templates/administration/user_profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
integrity="sha512-DTOQO9RWCH3ppGqcWaEA1BIZOC6xxalwEsw9c2QQeAIftl+Vegovlnee1c9QX4TctnWMn13TZye+giMm8e2LwA=="
crossorigin="anonymous" referrerpolicy="no-referrer"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/css/bootstrap.min.css"
integrity="sha512-b2QcS5SsA8tZodcDtGRELiGv5SaKSk1vDHDaQRda0htPYWZ6046lr3kJ5bAAQdpV2mmA/4v0wQF9MyU6/pDIAg=="
crossorigin="anonymous" referrerpolicy="no-referrer"/>
{% endblock %}
{% block title %}
{{ page_title }}
Expand Down Expand Up @@ -278,4 +275,3 @@ <h2>{% trans 'Service Offered' %}</h2>

<script src="{% static 'js/js-utils.js' %}"></script>
{% endblock %}

3 changes: 2 additions & 1 deletion appointment/views_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ def add_working_hours(request, staff_user_id=None, response_type='html'):
staff_user_id = staff_user_id or request.user.pk
if not check_permissions(staff_user_id, request.user):
message = _("You can only add your own working hours.")
print(f"Is staff {request.user.is_staff} ? or superuser: {request.user.is_superuser} ?")
return handle_unauthorized_response(request, message, response_type)
staff_user_id = staff_user_id if staff_user_id else request.user.pk
staff_member = get_staff_member_by_user_id(user_id=staff_user_id)
Expand Down Expand Up @@ -434,7 +435,7 @@ def create_new_staff_member(request):
@require_superuser
def make_superuser_staff_member(request):
user = request.user
StaffMember.objects.create(user=user)
StaffMember.objects.get_or_create(user=user)
return redirect('appointment:user_profile')


Expand Down