Skip to content

Commit

Permalink
feat: split tables by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrii Romaniuk committed Sep 24, 2021
1 parent 4b44f49 commit 1783e75
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
18 changes: 18 additions & 0 deletions core/migrations/0043_alter_table_split.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.3 on 2021-09-23 09:44

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("core", "0042_alter_url_author"),
]

operations = [
migrations.AlterField(
model_name="table",
name="split",
field=models.BooleanField(default=True),
),
]
2 changes: 1 addition & 1 deletion core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def __str__(self):
class Table(models.Model):
id = models.UUIDField(primary_key=True, editable=False, default=uuid.uuid4)
name = models.CharField(max_length=120)
split = models.BooleanField(default=False)
split = models.BooleanField(default=True)
include = models.BooleanField(default=True)
heading = models.CharField(max_length=31, blank=True, null=True)
array_tables = models.ManyToManyField("self", blank=True)
Expand Down
2 changes: 1 addition & 1 deletion core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def get_options_for_table(selections, exclude_tables_list, selection, tables, pa
selections[table.name]["only"] = only
if "repeat" in lite_table_config:
selections[table.name]["repeat"] = lite_table_config["repeat"]
if table.split:
if table.split and selection.kind != selection.OCDS_LITE:
get_options_for_table(selections, exclude_tables_list, selection, table.array_tables, table, analyzed_data)


Expand Down

0 comments on commit 1783e75

Please sign in to comment.