Skip to content

Commit

Permalink
fix(listing): pick actually the smallest one to update
Browse files Browse the repository at this point in the history
  • Loading branch information
shcheklein committed Dec 20, 2024
1 parent 8391d4e commit 08e1e75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/datachain/lib/dc.py
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ def parse_uri(
if listings:
if update:
# choosing the smallest possible one to minimize update time
listing = sorted(listings, key=lambda ls: len(ls.name))[0]
listing = sorted(listings, key=lambda ls: len(ls.name), reverse=True)[0]
else:
# no need to update, choosing the most recent one
listing = sorted(listings, key=lambda ls: ls.created_at)[-1]
Expand Down

0 comments on commit 08e1e75

Please sign in to comment.