From: Oleg Broytman Date: Sat, 27 Apr 2024 22:34:35 +0000 (+0300) Subject: Docs: Update TODO X-Git-Url: https://git.phdru.name/?p=m_librarian.git;a=commitdiff_plain;h=HEAD;hp=164a7672cd92ebac1414adf21cf7e7a2c04aa841 Docs: Update TODO [skip ci] --- diff --git a/TODO b/TODO index f1fa2d7..ddfc80b 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,13 @@ Next release ------------ +List of authors, list of books - +do not select when clicking on column/row titles. + + +List of authors - sort by clicking on column titles. + + Installers. diff --git a/docs-ru/news.rst b/docs-ru/news.rst index a66ea93..fbdd698 100644 --- a/docs-ru/news.rst +++ b/docs-ru/news.rst @@ -1,6 +1,11 @@ Новости ======= +Версия 0.3.2 (2024-03-??) +------------------------- + +* Исправлена ошибка с повторным добавлением жанра книги. + Версия 0.3.1 (2024-02-25) ------------------------- diff --git a/docs/news.rst b/docs/news.rst index 4d1fe11..ce0b046 100644 --- a/docs/news.rst +++ b/docs/news.rst @@ -1,6 +1,11 @@ News ==== +Version 0.3.2 (2024-03-??) +-------------------------- + +* Fix a bug with adding the same genre to a book. + Version 0.3.1 (2024-02-25) -------------------------- diff --git a/m_librarian/inp.py b/m_librarian/inp.py index f910b10..6d3bd7d 100644 --- a/m_librarian/inp.py +++ b/m_librarian/inp.py @@ -2,7 +2,7 @@ import os from zipfile import ZipFile -from sqlobject import sqlhub +from sqlobject import dberrors, sqlhub from sqlobject.sqlbuilder import Select from .db import Author, Book, Extension, Genre, Language, \ @@ -71,7 +71,10 @@ def import_inp_line(archive, parts): for genre in genres.split(':'): if genre: genre_row = insert_name(Genre, genre, title=genre) - book.addGenre(genre_row) + try: + book.addGenre(genre_row) + except dberrors.DuplicateEntryError: + pass # The genre has already been added def tounicode(s):