def save(self, *args, **kwargs):
if self.publication:<EOL><INDENT>publication = self.publication<EOL>if not self.title:<EOL><INDENT>self.title = publication.title<EOL><DEDENT>if not self.subtitle:<EOL><INDENT>first_author = publication.first_author<EOL>if first_author == publication.last_author:<EOL><INDENT>authors = first_author<EOL><DEDENT>else:<EOL><INDENT>authors = '<STR_LIT>'.format(first_author)<EOL><DEDENT>self.subtitle = '<STR_LIT>'.format(authors,<EOL>publication.journal, publication.year)<EOL><DEDENT>if not self.description:<EOL><INDENT>self.description = publication.abstract<EOL><DEDENT>if self.publication.year and not self.pk:<EOL><INDENT>delta = timezone.now() - self.publish_datetime<EOL>if self.publish_datetime <= timezone.now() and delta.days == <NUM_LIT:0>:<EOL><INDENT>self.publish_datetime = datetime.datetime(<EOL>year=int(self.publication.year),<EOL>month=int(self.publication.month or <NUM_LIT:1>),<EOL>day=int(self.publication.day or <NUM_LIT:1>),<EOL>)<EOL><DEDENT><DEDENT><DEDENT>super().save(*args, **kwargs)<EOL>
Before saving, if slide is for a publication, use publication info
for slide's title, subtitle, description.