Don't modify a signature when injecting on_delete for ForeignKeys.
Review Request #10334 — Created Nov. 26, 2018 and submitted — Latest diff uploaded
When setting a default
on_delete
attribute for mockedForeignKey
s,
we were modifying the dictionary of field attributes going into the
field's constructor. This resulted in the signature's field attributes
being modified, which broke diffing.This change simply updates the injector code to create a copy of the
dictionary before modifying it.
Unit tests passed.
Didn't hit any diffing issues with schemas.