Added missing 'on_delete=SET_NULL' to some foreign keys
Merge remote-tracking branch 'origin/develop' into staging