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
There is something weird here about the ContractFactory...
Instead of
order = factories.OrderFactory(product=product, owner=owner, contract=factories.ContractFactory())
this will work
order = factories.OrderFactory(product=product, owner=owner)
factories.ContractFactory(order=order)
Indeed, the ContractFactory uses a SubFactory to generate its related order.
So with your statement, the Contract is generated before the order so another Order is created before and linked to the Contract ...
To resume what's wrong, here it is a statement that will return True :
Bug Report
There is something weird here about the ContractFactory...
Instead of
this will work
Indeed, the
ContractFactory
uses a SubFactory to generate its related order.So with your statement, the Contract is generated before the order so another Order is created before and linked to the Contract ...
To resume what's wrong, here it is a statement that will return True :
Originally posted by @jbpenrath in #489 (comment)
The text was updated successfully, but these errors were encountered: