Skip to content

Commit

Permalink
#1268: Open text field panel to start
Browse files Browse the repository at this point in the history
Fixed typo and retrieval error in annotation constraint checking.
  • Loading branch information
susanodd committed Jul 4, 2024
1 parent eddec4b commit 39bcace
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions signbank/dictionary/batch_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def check_constraints_on_gloss_language_fields(gloss, value_dict):

annotationidglosstranslations = {}
for language in dataset.translation_languages.all():
annotation_key = 'annotation__' + gloss_prefix + language.language_code_2char
annotation_key = 'annotation_' + gloss_prefix + language.language_code_2char
if annotation_key in value_dict.keys():
if not value_dict[annotation_key]:
e2 = gettext("Annotation field is empty.")
Expand Down Expand Up @@ -246,8 +246,8 @@ def check_constraints_on_gloss_language_fields(gloss, value_dict):
for language, annotations in annotations_per_language_translation.items():
if annotations.count():
this_annotation = annotations.first()
if this_annotation.id not in existing_glosses and this_annotation.id != gloss.id:
existing_glosses.append(this_annotation.id)
if this_annotation.gloss.id not in existing_glosses and this_annotation.gloss.id != gloss.id:
existing_glosses.append(this_annotation.gloss.id)
e7 = gettext('Annotation ID Gloss') + " (" + language.name + ') ' + gettext(
'already exists.')
errors.append(e7)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ <h3>{% trans "Batch Edit" %}</h3>
<div class='panel-heading' data-toggle='collapse' data-parent="#toggles"
data-target='#toggle_language_fields_panel_{{gloss.id}}'>{% trans "Text Fields" %}
</div>
<div id='toggle_language_fields_panel_{{gloss.id}}' class="panel-collapse collapse">
<div id='toggle_language_fields_panel_{{gloss.id}}' class="panel-collapse collapse in">
<div class="panel-body" style="display:inline-block;">
<div>
<span>
Expand Down

0 comments on commit 39bcace

Please sign in to comment.