Commit d301f537f8bbffcceb07f89754479b20e1289dfe
1 parent
34978347
Add subdocuments' IDs information in error messages
Showing
2 changed files
with
6 additions
and
6 deletions
collector/storage/templates/storage/annotation.html
... | ... | @@ -99,7 +99,7 @@ |
99 | 99 | <table class="data-table doc-table" id="subdoc-list-table"> |
100 | 100 | <thead> |
101 | 101 | <tr> |
102 | - <th class="col-doc-name">Nazwa</th> | |
102 | + <th class="col-doc-name">Nazwa-ID</th> | |
103 | 103 | <th class="col-seq">Kolejność</th> |
104 | 104 | <th class="actions col-actions"></th> |
105 | 105 | </tr> |
... | ... |
collector/storage/views.py
... | ... | @@ -786,17 +786,17 @@ class FinishAnnotationView(RedirectView): |
786 | 786 | for subdoc in subdocuments: |
787 | 787 | if not subdoc.check_details_filling(): |
788 | 788 | messages.error(request, f'Błąd: Nie wypełniono wszystkich szczegółów poddokumentu o nazwie ' |
789 | - f'{subdoc.name}.') | |
789 | + f'"{subdoc.name}" i ID "{subdoc.id}".') | |
790 | 790 | return HttpResponseRedirect(reverse('annotation', kwargs={'doc_id': document.id})) |
791 | 791 | if subdoc.original_lang_error(): |
792 | 792 | messages.error(request, |
793 | - f'Błąd: Poddokument "{subdoc.name}" posiada tłumacza, ale posiada polski ' | |
794 | - f'język oryginału.') | |
793 | + f'Błąd: Poddokument "{subdoc.name}" o ID "{subdoc.id}" posiada tłumacza, ale posiada ' | |
794 | + f'polski język oryginału.') | |
795 | 795 | return HttpResponseRedirect(reverse('annotation', kwargs={'doc_id': document.id})) |
796 | 796 | if len(subdoc.chunks.all()) == 0: |
797 | 797 | messages.error(request, |
798 | - f'Błąd: Poddokument "{subdoc.name}" nie posiada żadnych sekcji. Usuń go przed ' | |
799 | - f'zakończeniem anotacji.') | |
798 | + f'Błąd: Poddokument "{subdoc.name}" o ID "{subdoc.id}" nie posiada żadnych sekcji. Usuń ' | |
799 | + f'go przed zakończeniem anotacji.') | |
800 | 800 | return HttpResponseRedirect(reverse('annotation', kwargs={'doc_id': document.id})) |
801 | 801 | document.change_processing_status('correct') |
802 | 802 | document.save() |
... | ... |