Fixed a bug when cloning a view and checking its type

This commit is contained in:
Celine Mercier
2016-11-23 11:28:17 +01:00
parent 0ab9e6c05a
commit 76a4c6b14e

View File

@ -619,7 +619,7 @@ cdef class OBIView_line :
value_b = str2bytes(value)
else :
value_b = value
if only_ATGC(value_b) : # TODO detect IUPAC?
if only_ATGC(value_b) : # TODO detect IUPAC
value_obitype = 'OBI_SEQ'
elif len(value) == 1 :
value_obitype = 'OBI_CHAR'
@ -729,7 +729,7 @@ cdef class OBIDMS :
# Check the type of the view to clone if there is one # TODO make generic for future other view types
if (view_to_clone is not None and \
((type(view_to_clone) == str and self.read_view_infos(view_to_clone)["view_type"] == bytes2str(VIEW_TYPE_NUC_SEQS)) or \
(view_to_clone.type == bytes2str(VIEW_TYPE_NUC_SEQS)))) or \
(type(view_to_clone) != str and view_to_clone.type == bytes2str(VIEW_TYPE_NUC_SEQS)))) or \
(line_selection is not None and (line_selection._view.type == bytes2str(VIEW_TYPE_NUC_SEQS))) :
view_type = bytes2str(VIEW_TYPE_NUC_SEQS)
view_class = OBIView_NUC_SEQS