Skip to content

Commit

Permalink
fix: Account for bad alignment flag in EditSyllabificationView
Browse files Browse the repository at this point in the history
This flag was introduced in v1.1.0 of volpiano-display-utilities
  • Loading branch information
dchiller committed Jun 12, 2024
1 parent 1d961f6 commit 3c270d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions django/cantusdb_project/main_app/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3644,11 +3644,11 @@ def test_edit_syllabification(self):
self.assertEqual(chant.manuscript_syllabized_full_text, "lorem ipsum")
response = self.client.post(
f"/edit-syllabification/{chant.id}",
{"manuscript_syllabized_full_text": "lo-rem ip-sum"},
{"manuscript_syllabized_full_text": "lore-m i-psum"},
)
self.assertEqual(response.status_code, 302) # 302 Found
chant.refresh_from_db()
self.assertEqual(chant.manuscript_syllabized_full_text, "lo-rem ip-sum")
self.assertEqual(chant.manuscript_syllabized_full_text, "lore-m i-psum")


class FeastListViewTest(TestCase):
Expand Down
2 changes: 1 addition & 1 deletion django/cantusdb_project/main_app/views/chant.py
Original file line number Diff line number Diff line change
Expand Up @@ -1193,7 +1193,7 @@ def get_initial(self):
initial = super().get_initial()
chant = self.get_object()
has_syl_text = bool(chant.manuscript_syllabized_full_text)
syls_text = syllabify_text(
syls_text, _ = syllabify_text(
text=chant.get_best_text_for_syllabizing(),
clean_text=True,
text_presyllabified=has_syl_text,
Expand Down

0 comments on commit 3c270d8

Please sign in to comment.