mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 05:07:50 +02:00
Fix a couple of bugs
This commit is contained in:
@@ -137,6 +137,10 @@ class Catalog(BaseBook):
|
||||
ordering = ["manufacturer", "publication_year"]
|
||||
|
||||
def __str__(self):
|
||||
# if the object is new, return an empty string to avoid
|
||||
# calling self.scales.all() which would raise a infinite recursion
|
||||
if self.pk is None:
|
||||
return str() # empty string
|
||||
scales = self.get_scales()
|
||||
return "%s %s %s" % (self.manufacturer.name, self.years, scales)
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
from ram.utils import git_suffix
|
||||
|
||||
__version__ = "0.17.2"
|
||||
__version__ = "0.17.3"
|
||||
__version__ += git_suffix(__file__)
|
||||
|
@@ -273,11 +273,11 @@ class RollingStockAdmin(SortableAdminBase, admin.ModelAdmin):
|
||||
settings.CSV_SEPARATOR_ALT.join(
|
||||
t.name for t in obj.tags.all()
|
||||
),
|
||||
obj.decoder_interface,
|
||||
obj.get_decoder_interface_display(),
|
||||
obj.decoder,
|
||||
obj.address,
|
||||
obj.purchase_date,
|
||||
obj.shop,
|
||||
obj.purchase_date,
|
||||
obj.price,
|
||||
properties,
|
||||
]
|
||||
|
Reference in New Issue
Block a user