This strictly a security feature Could also follow this "allowed" or not pattern # for sequences A perfect example of where it's nice to be able to have code that checks if something is in the list, and knows the list will exist...?
(self)
| 806 | self.instance_list_existing_dict[instance.id] = instance |
| 807 | |
| 808 | def get_allowed_label_file_ids(self): |
| 809 | """ |
| 810 | This strictly a security feature |
| 811 | |
| 812 | Could also follow this "allowed" or not pattern |
| 813 | # for sequences |
| 814 | |
| 815 | A perfect example of where it's nice to be able to have code that checks |
| 816 | if something is in the list, and knows the list will exist...? |
| 817 | |
| 818 | """ |
| 819 | project = self.project |
| 820 | if self.task: |
| 821 | logger.info(f"getting project from task {self.task.id}") |
| 822 | project = self.task.project |
| 823 | |
| 824 | assert project is not None |
| 825 | |
| 826 | if not project.label_dict: |
| 827 | project.refresh_label_dict(self.session) |
| 828 | self.allowed_label_file_id_list = project.label_dict.get('label_file_id_list') |
| 829 | |
| 830 | assert self.allowed_label_file_id_list is not None |
| 831 | |
| 832 | def validate_label_file_id(self): |
| 833 | """ |
no test coverage detected