'NoneType' object is not iterable

You are not returning anything from the server call:

ProductDetails:

@anvil.server.callable
def get_all_medicines(row):
  medicines_row = app_tables.categories.get(category="Medicines")
  row = app_tables.products.search(category=medicines_row)

This function does not return anything, so the caller will “receive” a None as a result of the anvil.server.call().
Hence the “NoneType” object.

  return app_tables.products.search(category=medicines_row)

Would be a way to fix this.

4 Likes