Skip to content

Commit

Permalink
Merge pull request #1050 from AI4Bharat/autosave2
Browse files Browse the repository at this point in the history
Autosave2 to Autosave1
  • Loading branch information
kartikvirendrar authored Apr 11, 2024
2 parents 34b0a6c + 76ad57d commit 33dc6b7
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 2 deletions.
12 changes: 12 additions & 0 deletions backend/dataset/migrations/0046_merge_20240403_1156.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Generated by Django 3.2.23 on 2024-04-03 11:56

from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("dataset", "0045_alter_ocrdocument_ocr_domain"),
("dataset", "0045_auto_20240321_0949"),
]

operations = []
2 changes: 1 addition & 1 deletion backend/projects/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ def create_parameters_for_task_creation(
tasks = create_tasks_from_dataitems(sampled_items, project)


# @shared_task
@shared_task
def export_project_in_place(
annotation_fields, project_id, project_type, get_request_data
) -> None:
Expand Down
1 change: 1 addition & 0 deletions backend/shoonya_backend/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"shoonya.ai4bharat.org",
"0.0.0.0",
"backend.shoonya.ai4bharat.org",
"backend.shoonya2.ai4bharat.org",
]

# Application definition
Expand Down
20 changes: 20 additions & 0 deletions backend/tasks/migrations/0049_annotation_version_updated_at.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 3.2.23 on 2024-04-04 06:16

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("tasks", "0048_alter_annotation_unique_together"),
]

operations = [
migrations.AddField(
model_name="annotation",
name="version_updated_at",
field=models.DateTimeField(
default="2000-01-01T00:00:00.000Z",
verbose_name="annotation_version_updated_at",
),
),
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Generated by Django 3.2.23 on 2024-04-11 14:30

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("tasks", "0049_annotation_version_updated_at"),
]

operations = [
migrations.AlterField(
model_name="annotation",
name="version_updated_at",
field=models.DateTimeField(
default="2000-01-01T00:00:00.000001Z",
verbose_name="annotation_version_updated_at",
),
),
]
8 changes: 7 additions & 1 deletion backend/tasks/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,13 @@ class Annotation(models.Model):
created_at = models.DateTimeField(
auto_now_add=True, verbose_name="annotation_created_at"
)
updated_at = models.DateTimeField(verbose_name="annotation_updated_at")
updated_at = models.DateTimeField(
auto_now=True, verbose_name="annotation_updated_at"
)
version_updated_at = models.DateTimeField(
default="2000-01-01T00:00:00.000001Z",
verbose_name="annotation_version_updated_at",
)
lead_time = models.FloatField(default=0.0, verbose_name="annotation_lead_time")
parent_annotation = models.ForeignKey(
"self",
Expand Down

0 comments on commit 33dc6b7

Please sign in to comment.