Code Duplication    Length = 11-11 lines in 2 locations

bika/lims/browser/listing/view.py 2 locations

@@ 1016-1026 (lines=11) @@
1013
                # if the key is already in the results dict
1014
                # then we don't replace it's value
1015
                value = results_dict.get(key, '')
1016
                if key not in results_dict:
1017
                    attrobj = getFromString(obj, key)
1018
                    value = attrobj if attrobj else value
1019
1020
                    # Custom attribute? Inspect to set the value
1021
                    # for the current column dinamically
1022
                    vattr = self.columns[key].get('attr', None)
1023
                    if vattr:
1024
                        attrobj = getFromString(obj, vattr)
1025
                        value = attrobj if attrobj else value
1026
                    results_dict[key] = value
1027
1028
                # Replace with an url?
1029
                replace_url = self.columns[key].get('replace_url', None)
@@ 819-829 (lines=11) @@
816
                # if the key is already in the results dict
817
                # then we don't replace it's value
818
                value = results_dict.get(key, '')
819
                if not value:
820
                    attrobj = getFromString(obj, key)
821
                    value = attrobj if attrobj else value
822
823
                    # Custom attribute? Inspect to set the value
824
                    # for the current column dynamically
825
                    vattr = self.columns[key].get('attr', None)
826
                    if vattr:
827
                        attrobj = getFromString(obj, vattr)
828
                        value = attrobj if attrobj else value
829
                    results_dict[key] = value
830
                # Replace with an url?
831
                replace_url = self.columns[key].get('replace_url', None)
832
                if replace_url: