Fakultas Ilmu Komputer UI

Commit ec5607bd authored by Jonathan Christopher Jakub's avatar Jonathan Christopher Jakub
Browse files

[CHORES] Fix styling issues

parent 03d2339f
Pipeline #34684 passed with stages
in 2 minutes and 28 seconds
......@@ -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",},
),
]
......@@ -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)
......
......@@ -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
......
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment