Toggle navigation
Toggle navigation
This project
Loading...
Sign in
cse437_e
/
smartdoorlock-backend
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
오윤석
2020-11-23 23:15:48 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
223523bab1023701fc4c288f597c016b8b42d1ba
223523ba
1 parent
97d0ecef
기기추가 API rfid_id 인식 못하는 오류 수정
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
api/views.py
api/views.py
View file @
223523b
...
...
@@ -133,8 +133,7 @@ class Devices(APIView) :
if
request
.
auth
==
None
:
raise
PermissionDenied
print
(
request
.
data
)
data
=
{
x
:
request
.
POST
.
get
(
x
)
for
x
in
request
.
POST
.
keys
()}
request_id
=
data
.
get
(
'rfid_id'
,
None
)
request_id
=
request
.
data
.
get
(
'rfid_id'
,
None
)
if
request_id
==
None
:
raise
FieldDoesNotExist
queryset
=
Device
.
objects
.
create
(
rfid_id
=
request_id
)
...
...
Please
register
or
login
to post a comment