Fixed UnboundLocalError at L431 where related_model_created did not eval False