You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently if you misconfigure a strategy, perhaps by omitting a name or by forgetting to call super().__init__() passing everything through in its initialiser, devdata doesn't give much useful feedback.
The error you do get is:
File ".../devdata/engine.py", line 72, in export_data
model_strategies = sort_model_strategies(settings.strategies)
File ".../devdata/utils.py", line 72, in sort_model_strategies
for dep in strategy.depends_on:
AttributeError: 'tuple' object has no attribute 'depends_on'
Which is unfortunately considerably later in devdata's processing.
I think the fix is likely to change the handling in settings.py, so that the strategy construction logic is more explicitly able to tell the difference between the available valid options and those which are erroneous:
Currently if you misconfigure a strategy, perhaps by omitting a
name
or by forgetting to callsuper().__init__()
passing everything through in its initialiser, devdata doesn't give much useful feedback.The error you do get is:
Which is unfortunately considerably later in devdata's processing.
I think the fix is likely to change the handling in
settings.py
, so that the strategy construction logic is more explicitly able to tell the difference between the available valid options and those which are erroneous:django-devdata/src/devdata/settings.py
Lines 39 to 44 in da8933c
The text was updated successfully, but these errors were encountered: