mirror of
https://github.com/evennia/evennia.git
synced 2026-03-28 18:47:16 +01:00
Fixed objects-command zerodiv error with totally empty Object database.
This commit is contained in:
parent
6812906caa
commit
dcd14cb621
1 changed files with 2 additions and 0 deletions
|
|
@ -372,6 +372,8 @@ class CmdObjects(MuxCommand):
|
|||
nexits = ObjectDB.objects.filter(db_location__isnull=False, db_destination__isnull=False).count()
|
||||
nother = nobjs - nchars - nrooms - nexits
|
||||
|
||||
nobjs = nobjs or 1 # fix zero-div error with empty database
|
||||
|
||||
# total object sum table
|
||||
totaltable = EvTable("{wtype{n", "{wcomment{n", "{wcount{n", "{w%%{n", border="cells")
|
||||
totaltable.align = 'l'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue