Skip to content

Commit

Permalink
Refacto: remove useless 'if match' condition
Browse files Browse the repository at this point in the history
  • Loading branch information
amelie-rondot committed Feb 14, 2024
1 parent 64cd4c3 commit 50c8217
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions frictionless/resources/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,12 +350,11 @@ def row_stream():
match = memory_primary.get(cells)
memory_primary[cells] = row.row_number
if match:
if match:
note = "the same as in the row at position %s" % match
error = errors.PrimaryKeyError.from_row(
row, note=note
)
row.errors.append(error)
note = "the same as in the row at position %s" % match
error = errors.PrimaryKeyError.from_row(
row, note=note
)
row.errors.append(error)

# Foreign Key Error
if is_integrity and foreign_groups:
Expand Down

0 comments on commit 50c8217

Please sign in to comment.