Skip to content

Commit

Permalink
Rename feature variables to avoid clashing with import
Browse files Browse the repository at this point in the history
  • Loading branch information
mbsantiago committed Feb 2, 2025
1 parent 09bf045 commit b50408f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions back/src/whombat/api/clips.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ async def create(
**kwargs,
)

features = await self._create_clip_features(session, [clip])
clip = clip.model_copy(update=dict(features=features[0]))
feats = await self._create_clip_features(session, [clip])
clip = clip.model_copy(update=dict(features=feats[0]))
self._update_cache(clip)
return clip

Expand Down Expand Up @@ -111,8 +111,8 @@ async def create_many_without_duplicates(

clip_features = await self._create_clip_features(session, clips)
return [
clip.model_copy(update=dict(features=features))
for clip, features in zip(clips, clip_features, strict=False)
clip.model_copy(update=dict(features=feats))
for clip, feats in zip(clips, clip_features, strict=False)
]

async def add_feature(
Expand Down Expand Up @@ -308,8 +308,8 @@ async def _create_clip_features(

create_values = [
(clip.id, feature.name, feature.value)
for clip, features in zip(clips, clip_features, strict=False)
for feature in features
for clip, feats in zip(clips, clip_features, strict=False)
for feature in feats
]

# Get feature names
Expand Down

0 comments on commit b50408f

Please sign in to comment.