Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
2020
PPL-C
PPTI-Mobile Apps Monitoring Wabah Tuberkolosis
Neza-Backend
Commits
ec5607bd
Commit
ec5607bd
authored
Mar 04, 2020
by
Jonathan Christopher Jakub
Browse files
[CHORES] Fix styling issues
parent
03d2339f
Pipeline
#34684
passed with stages
in 2 minutes and 28 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/accounts/migrations/0001_initial.py
View file @
ec5607bd
...
...
@@ -16,22 +16,33 @@ class Migration(migrations.Migration):
operations
=
[
migrations
.
CreateModel
(
name
=
'
Account
'
,
name
=
"
Account
"
,
fields
=
[
(
'id'
,
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
editable
=
False
,
primary_key
=
True
,
serialize
=
False
)),
(
'name'
,
models
.
CharField
(
max_length
=
128
)),
(
'email'
,
models
.
EmailField
(
max_length
=
128
)),
(
'phone_number'
,
models
.
CharField
(
max_length
=
64
)),
(
'area'
,
models
.
CharField
(
max_length
=
128
)),
(
'is_admin'
,
models
.
BooleanField
(
default
=
False
)),
(
'is_verified'
,
models
.
BooleanField
(
default
=
False
)),
(
'is_active'
,
models
.
BooleanField
(
default
=
False
)),
(
'created_at'
,
models
.
DateTimeField
(
auto_now_add
=
True
)),
(
'user'
,
models
.
OneToOneField
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
settings
.
AUTH_USER_MODEL
)),
(
"id"
,
models
.
UUIDField
(
default
=
uuid
.
uuid4
,
editable
=
False
,
primary_key
=
True
,
serialize
=
False
,
),
),
(
"name"
,
models
.
CharField
(
max_length
=
128
)),
(
"email"
,
models
.
EmailField
(
max_length
=
128
)),
(
"phone_number"
,
models
.
CharField
(
max_length
=
64
)),
(
"area"
,
models
.
CharField
(
max_length
=
128
)),
(
"is_admin"
,
models
.
BooleanField
(
default
=
False
)),
(
"is_verified"
,
models
.
BooleanField
(
default
=
False
)),
(
"is_active"
,
models
.
BooleanField
(
default
=
False
)),
(
"created_at"
,
models
.
DateTimeField
(
auto_now_add
=
True
)),
(
"user"
,
models
.
OneToOneField
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
settings
.
AUTH_USER_MODEL
,
),
),
],
options
=
{
'verbose_name_plural'
:
'accounts'
,
'db_table'
:
'account'
,
},
options
=
{
"verbose_name_plural"
:
"accounts"
,
"db_table"
:
"account"
,},
),
]
apps/accounts/models.py
View file @
ec5607bd
...
...
@@ -2,6 +2,7 @@ import uuid
from
django.contrib.auth.models
import
User
from
django.db
import
models
class
Account
(
models
.
Model
):
id
=
models
.
UUIDField
(
primary_key
=
True
,
default
=
uuid
.
uuid4
,
editable
=
False
)
user
=
models
.
OneToOneField
(
User
,
on_delete
=
models
.
CASCADE
)
...
...
apps/cases/models.py
View file @
ec5607bd
...
...
@@ -26,7 +26,7 @@ class CaseSubject(models.Model):
class
Meta
:
db_table
=
"case_subject"
verbose_name_plural
=
"case subjects"
def
delete
(
self
):
if
self
.
deleted_at
is
None
:
self
.
is_active
=
False
...
...
apps/cases/views.py
View file @
ec5607bd
...
...
@@ -90,9 +90,7 @@ class InvestigationCaseViewSet(viewsets.ViewSet):
def
update
(
self
,
request
,
pk
=
None
):
previous_instance
=
get_object_or_404
(
self
.
queryset
,
pk
=
pk
)
serializer
=
InvestigationCaseSerializer
(
previous_instance
,
data
=
request
.
data
)
serializer
=
InvestigationCaseSerializer
(
previous_instance
,
data
=
request
.
data
)
serializer
.
is_valid
(
raise_exception
=
True
)
serializer_data
=
serializer
.
validated_data
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment