def clean(self):
            """Convert expiry options to actual dates and add publish time
            to publish date
            """
            data = self.cleaned_data

            if not self._errors:
                tags = data['tags']
                tags = tags.lower()
                if tags in ',':
                    tags = [tag.strip() for tag in tags.split(',')]
                else:
                    tags = [tag.strip() for tag in tags.split()]
                data['tags'] = tags

                # We're using publish_time to get the time from the user - in
                # the DB its actually just part of publish_date, so update
                # publish_date to include publish_time's info
                publish_time = data['publish_time']
                expiry_time = data['expiry_time']
                if publish_time and data['publish_date']:
                    data['publish_date'] = data['publish_date'].replace(
                        hour=publish_time.hour,
                        minute=publish_time.minute,
                        second=publish_time.second)
                if expiry_time and data['expiry_date']:
                    data['expiry_date'] = data['expiry_date'].replace(
                        hour=expiry_time.hour,
                        minute=expiry_time.minute,
                        second=expiry_time.second)

                # The comments expiry date is selected and stored as a relative
                # time from the publish_date but it is useful to have an actual
                # expiry date too, so we work it out here
                comments_expiry = data['comments_expiry']
                publish_date = data['publish_date']
                if comments_expiry:
                    data['comments_expiry_date'] = {
                        # With no simple way of adding an exact month,
                        # approximate day representations are used
                        'never': lambda now: None,
                        'week': lambda now: now + timedelta(7),
                        'month': lambda now: now + timedelta(30),
                        'half_year': lambda now: now + timedelta(182),
                    }[comments_expiry](publish_date)
                else:
                    data['comments_expiry_date'] = None

            return data
dataset/ETHPy150Open hmarr/django-mumblr/mumblr/entrytypes/__init__.py/EntryType.AdminForm.clean/swapped operands of `in`