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
My first question is, why is this not documented? It seems to be tested so it must work for normal use.
My second question involves using SKIP with the SQLAlchemy backend. I've noticed if you try to use these together, you'll get an error:
# I think the model you use here can be anything that has a relationship fieldx=mix.blend(models.ReportMeta, report_meta_key='key_1', report_meta_value='1', report=mix.SKIP)
And you get:
Traceback (most recent call last):
File "/home/michael/Programming/MegaQC/venv/lib/python3.6/site-packages/mixer/main.py", line 568, in blend
return type_mixer.blend(**values)
File "/home/michael/Programming/MegaQC/venv/lib/python3.6/site-packages/mixer/main.py", line 140, in blend
target = self.postprocess(target, postprocess_values)
File "/home/michael/Programming/MegaQC/venv/lib/python3.6/site-packages/mixer/backend/sqlalchemy.py", line 76, in postprocess
setattr(target, name, value)
File "/home/michael/Programming/MegaQC/venv/lib/python3.6/site-packages/sqlalchemy/orm/attributes.py", line 262, in __set__
instance_state(instance), instance_dict(instance), value, None
File "/home/michael/Programming/MegaQC/venv/lib/python3.6/site-packages/sqlalchemy/orm/attributes.py", line 975, in set
value = self.fire_replace_event(state, dict_, value, old, initiator)
File "/home/michael/Programming/MegaQC/venv/lib/python3.6/site-packages/sqlalchemy/orm/attributes.py", line 998, in fire_replace_event
state, value, previous, initiator or self._replace_token
File "/home/michael/Programming/MegaQC/venv/lib/python3.6/site-packages/sqlalchemy/orm/attributes.py", line 1407, in emit_backref_from_scalar_set_event
instance_state(child),
AttributeError: Mixer (<class 'megaqc.model.models.ReportMeta'>): 'object' object has no attribute '_sa_instance_state'
I assume this is a bug?
The text was updated successfully, but these errors were encountered:
I noticed in the tests, and the source code, that there is a
mixer.SKIP
property that can be used to skip the generation of certain fields:mixer/tests/test_main.py
Lines 287 to 291 in 6af15d5
My first question is, why is this not documented? It seems to be tested so it must work for normal use.
My second question involves using
SKIP
with the SQLAlchemy backend. I've noticed if you try to use these together, you'll get an error:And you get:
I assume this is a bug?
The text was updated successfully, but these errors were encountered: