summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--updatewcs/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/updatewcs/__init__.py b/updatewcs/__init__.py
index 0dd21d4..52769ef 100644
--- a/updatewcs/__init__.py
+++ b/updatewcs/__init__.py
@@ -181,7 +181,7 @@ def getKeyName(hdr, wkey, wname, idcname):
# if not - get the next availabble key
name = wname
key = wcsutil.getKeyFromName(hdr, wname)
- if not wkey:
+ if not key:
key = wcsutil.next_wcskey(hdr)
else:
key = wkey