def save(self, *args, **kwargs):
<EOL>self.cache_data()<EOL>if self.id is not None:<EOL><INDENT>db_company = Company.objects.get(id=self.id)<EOL>if self.slug_name != db_company.slug_name:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT><DEDENT>if str(self.trade_name).strip() == "<STR_LIT>":<EOL><INDENT>self.trade_name = None<EOL><DEDENT>if len(str(self.short_description)) > <NUM_LIT>:<EOL><INDENT>raise AssertionError("<STR_LIT>")<EOL><DEDENT>if self.sub_industry is not None:<EOL><INDENT>self.industry = self.sub_industry.industry<EOL>self.industry_group = self.sub_industry.industry.industry_group<EOL>self.sector = self.sub_industry.industry.industry_group.sector<EOL>self.sub_industry_name = self.sub_industry.name<EOL>self.industry_name = self.industry.name<EOL>self.industry_group_name = self.industry_group.name<EOL>self.sector_name = self.sector.name<EOL><DEDENT>super(Company, self).save(*args, **kwargs)<EOL>
This method autogenerates the auto_generated_description field