Browse Source

Remove direction field from Relation model

pull/1703/head
Hironsan 2 years ago
parent
commit
fc0da6d21d
2 changed files with 17 additions and 5 deletions
  1. 17
      backend/labels/migrations/0011_remove_relation_direction.py
  2. 5
      backend/labels/models.py

17
backend/labels/migrations/0011_remove_relation_direction.py

@ -0,0 +1,17 @@
# Generated by Django 4.0.2 on 2022-03-02 01:30
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("labels", "0010_rename_relationnew_relation"),
]
operations = [
migrations.RemoveField(
model_name="relation",
name="direction",
),
]

5
backend/labels/models.py

@ -102,11 +102,6 @@ class Relation(Label):
to_id = models.ForeignKey(Span, on_delete=models.CASCADE, related_name="to_relations")
type = models.ForeignKey(RelationType, on_delete=models.CASCADE)
example = models.ForeignKey(to=Example, on_delete=models.CASCADE, related_name="relations")
direction = models.CharField(
max_length=10,
choices=(("left", "left"), ("right", "right"), ("undirected", "undirected")),
default="undirected",
)
def __str__(self):
return self.__dict__.__str__()

Loading…
Cancel
Save