Created
December 17, 2014 20:31
-
-
Save cacheleocode/5911dd28daa0fc5c053d to your computer and use it in GitHub Desktop.
determine if article is legacy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def is_legacy(self): | |
| is_legacy = False | |
| temp = [] | |
| if not self.image_attachments(): | |
| if not self.image: | |
| temp.append(False) | |
| else: | |
| temp.append(True) | |
| else: | |
| temp.append(True) | |
| # remove duplicates | |
| temp = list(set(temp)) | |
| # if no attachment images or key image | |
| if len(temp) == 1 and False in temp: | |
| is_legacy = True | |
| return is_legacy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment