Skip to content

🐛 Fix the filtering for the existing records check - #3845

Open
ishitajain9717 wants to merge 2 commits into
mainfrom
space_fixes
Open

🐛 Fix the filtering for the existing records check#3845
ishitajain9717 wants to merge 2 commits into
mainfrom
space_fixes

Conversation

@ishitajain9717

Copy link
Copy Markdown
Contributor

Here, in this PR we are trying to fix the criteria for checking of existing projects to avoid deduplication.

Fixes: pfizer-collab/laminlabs#1139

@codecov

codecov Bot commented Aug 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.99%. Comparing base (112244e) to head (a0c5f34).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3845      +/-   ##
==========================================
- Coverage   91.55%   86.99%   -4.56%     
==========================================
  Files          88       88              
  Lines       15747    15772      +25     
==========================================
- Hits        14417    13721     -696     
- Misses       1330     2051     +721     
Files with missing lines Coverage Δ
lamindb/models/sqlrecord.py 92.10% <100.00%> (+0.03%) ⬆️

... and 15 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deployment URL: https://2f1d926a.lamindb.pages.dev

subset = record.__class__
exact_match = subset.filter(**{name_field: kwargs[name_field]}).first()
# Fallback: if no match was found and no type= was passed, also search for
# is_type=True records that have a non-null parent type. Such records (e.g. a

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why is_type=True is missed above. Can you explain?

exact_match = subset.filter(**{name_field: kwargs[name_field]}).first()
# Fallback: if no match was found and no type= was passed, also search for
# is_type=True records that have a non-null parent type. Such records (e.g. a
# Project subtype) are missed by the filter(type__isnull=True) above and would

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you 100% sure about this? I'm not seeing why it would be missed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants