Update models.py

`Line.attributes` are populated after line creation so let it check  if `self.stockrecord_source == self.OPTIONS_CALCULATOR` and then we do a query using `self.attributes.all().exists()`, this solved the problem