1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2025-07-08 03:30:20 +02:00

Give ISBN to each borrowable object, even if it does not have one

This commit is contained in:
2021-11-02 12:32:31 +01:00
parent a01d480dd2
commit c424c7c040
2 changed files with 9 additions and 9 deletions

View File

@ -32,6 +32,14 @@ class Author(models.Model):
class Borrowable(PolymorphicModel):
isbn = ISBNField(
_('ISBN'),
help_text=_('You may be able to scan it from a bar code.'),
unique=True,
blank=True,
null=True,
)
title = models.CharField(
max_length=255,
verbose_name=_("title"),
@ -83,14 +91,6 @@ class Medium(Borrowable):
class Book(Medium):
isbn = ISBNField(
_('ISBN'),
help_text=_('You may be able to scan it from a bar code.'),
unique=True,
blank=True,
null=True,
)
subtitle = models.CharField(
verbose_name=_('subtitle'),
max_length=255,