Skip to content

Commit eebca73

Browse files
Remove duplicated condition in primary key check (#1240)
1 parent fe8e926 commit eebca73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cassandra/cqlengine/management.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def _sync_table(model, connection=None):
256256

257257
continue
258258

259-
if col.primary_key or col.primary_key:
259+
if col.primary_key:
260260
msg = format_log_context("Cannot add primary key '{0}' (with db_field '{1}') to existing table {2}", keyspace=ks_name, connection=connection)
261261
raise CQLEngineException(msg.format(model_name, db_name, cf_name))
262262

0 commit comments

Comments
 (0)