We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 945089c commit 1541fedCopy full SHA for 1541fed
1 file changed
src/lampyrid/models/lampyrid_models.py
@@ -385,7 +385,14 @@ def validate_search_criteria(self):
385
self.account_contains,
386
self.account_id,
387
]
388
- if not any(field is not None for field in search_fields):
+ # Consider a field provided if: (a) it's not None and not a string, or
389
+ # (b) it's a string and not empty/whitespace-only
390
+ has_criteria = any(
391
+ (field is not None and not isinstance(field, str))
392
+ or (isinstance(field, str) and field.strip() != '')
393
+ for field in search_fields
394
+ )
395
+ if not has_criteria:
396
raise ValueError('At least one search criterion must be provided')
397
return self
398
0 commit comments