Skip to content

Commit

Permalink
Fix: Change createAt from epoch seconds to datetiem
Browse files Browse the repository at this point in the history
Signed-off-by: George J Padayatti <george.padayatti@igrant.io>
  • Loading branch information
georgepadayatti committed Apr 5, 2024
1 parent fe8335d commit 89311ea
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
18 changes: 18 additions & 0 deletions data_disclosure_agreement/migrations/0002_auto_20240405_1049.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.0.7 on 2024-04-05 10:49

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('data_disclosure_agreement', '0001_initial'),
]

operations = [
migrations.AlterField(
model_name='datadisclosureagreement',
name='createdAt',
field=models.DateTimeField(auto_now_add=True),
),
]
4 changes: 2 additions & 2 deletions data_disclosure_agreement/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from uuid import uuid4
from jsonfield.fields import JSONField
from config.models import DataSource
from time import time_ns
from time import time


# Create your models here.
Expand All @@ -25,7 +25,7 @@ class DataDisclosureAgreement(models.Model):
)
dataSourceId = models.ForeignKey(DataSource, on_delete=models.CASCADE)
dataDisclosureAgreementRecord = JSONField()
createdAt = models.IntegerField(default=time_ns, editable=False)
createdAt = models.DateTimeField(auto_now_add=True)
isLatestVersion = models.BooleanField(default=True)

@staticmethod
Expand Down

0 comments on commit 89311ea

Please sign in to comment.