Skip to content

Commit 1471de1

Browse files
committed
OpenConceptLab/ocl_online#36 | added scispacy_enabled field
1 parent a7f3d84 commit 1471de1

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 4.2.16 on 2026-01-20 06:18
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('map_projects', '0021_mapproject_bridge_enabled'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='mapproject',
15+
name='scispacy_enabled',
16+
field=models.BooleanField(default=False),
17+
),
18+
]

core/map_projects/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class MapProject(BaseModel):
3838
candidates = models.JSONField(default=dict, null=True, blank=True)
3939
reranker = models.BooleanField(default=False)
4040
bridge_enabled = models.BooleanField(default=False)
41+
scispacy_enabled = models.BooleanField(default=False)
4142

4243
# Custom API
4344
match_api_url = models.TextField(null=True, blank=True)

core/map_projects/serializers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class Meta:
2323
'public_access', 'file', 'user_id', 'organization_id', 'description',
2424
'target_repo_url', 'matching_algorithm', 'include_retired', 'score_configuration',
2525
'match_api_url', 'match_api_token', 'batch_size', 'filters', 'candidates', 'reranker',
26-
'bridge_enabled'
26+
'bridge_enabled', 'scispacy_enabled'
2727
]
2828

2929
def prepare_object(self, validated_data, instance=None, file=None):
@@ -38,7 +38,7 @@ def prepare_object(self, validated_data, instance=None, file=None):
3838
for attr in [
3939
'name', 'description', 'extras', 'target_repo_url', 'matching_algorithm', 'include_retired', 'reranker',
4040
'score_configuration', 'match_api_url', 'match_api_token', 'batch_size', 'filters', 'candidates',
41-
'bridge_enabled'
41+
'bridge_enabled', 'scispacy_enabled'
4242
]:
4343
setattr(instance, attr, validated_data.get(attr, get(instance, attr)))
4444
if not instance.id:
@@ -108,7 +108,7 @@ class Meta:
108108
'owner', 'owner_type', 'owner_url', 'public_access',
109109
'target_repo_url', 'matching_algorithm', 'summary', 'logs', 'include_retired',
110110
'score_configuration', 'match_api_url', 'match_api_token', 'batch_size', 'filters', 'candidates',
111-
'reranker', 'bridge_enabled'
111+
'reranker', 'bridge_enabled', 'scispacy_enabled'
112112
]
113113

114114
def __init__(self, *args, **kwargs):

0 commit comments

Comments
 (0)