if self.selected_fields is None or last three elements of field.attname are contained in self.selected_fields:
if self . selected_fields is None or field . attname [ : - 3 ] in self . selected_fields :