Opened 17 years ago

Last modified 17 years ago

#6782 closed

reset on apps without models causes exception — at Initial Version

Reported by: niklas@… Owned by: nobody
Component: Core (Management commands) Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

# The orders and customers apps contain no models. This causes
# the exception below

apps = ['resources', 'orders', 'common', 'customers']
management.call_command('reset', *apps)

Traceback (most recent call last):

File "S:\nc\Projects\Inventive\Ticmate\svn\ticmate\trunk\source\python\ticmate\django\scripts\ticrun.py", line 249, in <module>

func()

File "S:\nc\Projects\Inventive\Ticmate\svn\ticmate\trunk\source\python\ticmate\django\scripts\ticrun.py", line 90, in tr_reset

tr_reset_no_reload()

File "S:\nc\Projects\Inventive\Ticmate\svn\ticmate\trunk\source\python\ticmate\django\scripts\ticrun.py", line 145, in tr_reset_no_reload

tr_reset_apps()

File "S:\nc\Projects\Inventive\Ticmate\svn\ticmate\trunk\source\python\ticmate\django\scripts\ticrun.py", line 149, in tr_reset_apps

reset_apps()

File "S:\nc\Projects\Inventive\Ticmate\svn\ticmate\trunk\source\python\ticmate\django\scripts\ticrun.py", line 171, in reset_apps

management.call_command('reset', *apps)#, verbosity=2, noinput=True)

File "S:\nc\Projects\Inventive\Ticmate\svn\django-trunk\django\core\management\init.py", line 126, in call_command

return klass.execute(*args, options)

File "S:\nc\Projects\Inventive\Ticmate\svn\django-trunk\django\core\management\base.py", line 86, in execute

output = self.handle(*args, options)

File "S:\nc\Projects\Inventive\Ticmate\svn\django-trunk\django\core\management\base.py", line 136, in handle

app_output = self.handle_app(app, options)

File "S:\nc\Projects\Inventive\Ticmate\svn\django-trunk\django\core\management\commands\reset.py", line 24, in handle_app

sql_list = sql_reset(app, self.style)

File "S:\nc\Projects\Inventive\Ticmate\svn\django-trunk\django\core\management\sql.py", line 206, in sql_reset

return sql_delete(app, style) + sql_all(app, style)

File "S:\nc\Projects\Inventive\Ticmate\svn\django-trunk\django\core\management\sql.py", line 194, in sql_delete

app_label = app_models[0]._meta.app_label

IndexError: list index out of range

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top