diff --git a/mxcubecore/HardwareObjects/Session.py b/mxcubecore/HardwareObjects/Session.py index c85a238b71..7d3dd1904e 100644 --- a/mxcubecore/HardwareObjects/Session.py +++ b/mxcubecore/HardwareObjects/Session.py @@ -280,7 +280,10 @@ def get_default_prefix(self, sample_data_node=None, generic_name=False): prefix = proposal if sample_data_node: - if sample_data_node.has_lims_data(): + if ( + sample_data_node.has_lims_data() + or sample_data_node.has_protein_acronym() + ): protein_acronym = sample_data_node.crystals[0].protein_acronym name = sample_data_node.name if protein_acronym: diff --git a/mxcubecore/model/queue_model_objects.py b/mxcubecore/model/queue_model_objects.py index 62d16fff44..6c3f838fda 100644 --- a/mxcubecore/model/queue_model_objects.py +++ b/mxcubecore/model/queue_model_objects.py @@ -322,6 +322,14 @@ def has_lims_data(self): except TypeError: return False return False + + def has_protein_acronym(self): + try: + if hasattr(self.crystals[0], "protein_acronym"): + return True + except TypeError: + return False + return False def get_name(self): return self._name