fusion-flap / flap

Fusion Library of Analysis Programs
MIT License
11 stars 5 forks source link

flap.get_data_object inconsistency #82

Closed thelampire closed 4 years ago

thelampire commented 4 years ago

As far as I know, the flap.get_data_object should return a new object whereas the flap.get_data_object_ref should return a reference to the existing one. This is not the case. The copy.deepcopy returning is only implemented for the get_data_object when there is a keyerror and the resulting nlist length is 1 which I believe happens, when there is an object without an exp_id for some reason. I think line 3510 should be d = copy.deepcopy(self.__data_objects[_name]).

sandorzoletnik commented 4 years ago

Indeed this was a bug, fixed now in master and development branches