Skip to content

Commit

Permalink
code clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
specialunderwear committed Jan 4, 2024
1 parent 52d677d commit c89219a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions oscar_odin/mappings/catalogue.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,10 @@ def products_to_model(

result = product_mapper.apply(products, context=context)

if not isinstance(result, ProductModel):
try:
return (list(result), context)

return ([result], context)
except TypeError: # it is not a list
return ([result], context)


def products_to_db(
Expand Down

0 comments on commit c89219a

Please sign in to comment.