mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix not detecting reuse of a column key
This commit is contained in:
parent
84766698cb
commit
f63e1973c6
@ -181,10 +181,12 @@ class CreateCustomColumn(QDialog, Ui_QCreateCustomColumn):
|
||||
is_multiple = False
|
||||
if not col_heading:
|
||||
return self.simple_error('', _('No column heading was provided'))
|
||||
|
||||
bad_col = False
|
||||
if col in self.parent.custcols:
|
||||
colkey = '#' + col
|
||||
if colkey in self.parent.custcols:
|
||||
if not self.editing_col or \
|
||||
self.parent.custcols[col]['colnum'] != self.orig_column_number:
|
||||
self.parent.custcols[colkey]['colnum'] != self.orig_column_number:
|
||||
bad_col = True
|
||||
if bad_col:
|
||||
return self.simple_error('', _('The lookup name %s is already used')%col)
|
||||
|
Loading…
x
Reference in New Issue
Block a user