divanov11 / proshop_django

407 stars 430 forks source link

Update getProducts to use a Pythonic way #31

Open khalidfasely opened 2 years ago

khalidfasely commented 2 years ago

Instead of using: query = request.query_params.get('keyword') if query == None: query = '' which is right by the way, we better use the Pythonic way of doing it: query = request.query_params.get('keyword') or ''