This commit is contained in:
Louis Mazin 2026-09-15 20:07:11 +02:00
parent 4b40d179b8
commit d7b42af4c0

View File

@ -37,7 +37,9 @@ class TimeEntryScanView(APIView):
permission_classes = [IsAuthenticated] permission_classes = [IsAuthenticated]
def post(self, request): def post(self, request):
code = str(request.data.get('code') or '').strip() code = str(request.data.get('code') or '').strip().strip('"\'')
if '=' in code:
code = code.split('=', 1)[1].strip().strip('"\'')
enter_code = config('SECRET_POINTAGE_ENTER', default='').strip() enter_code = config('SECRET_POINTAGE_ENTER', default='').strip()
exit_code = config('SECRET_POINTAGE_EXIT', default='').strip() exit_code = config('SECRET_POINTAGE_EXIT', default='').strip()
if code == enter_code: if code == enter_code: