nice
This commit is contained in:
parent
4b40d179b8
commit
d7b42af4c0
@ -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:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user