Skip to content

Commit ea614b1

Browse files
committed
Allow searching for ingredient source names in the API
1 parent a593168 commit ea614b1

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

wger/nutrition/api/filtersets.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,22 @@ class Meta:
2727
'id': ['exact', 'in'],
2828
'uuid': ['exact'],
2929
'code': ['exact'],
30+
'source_name': ['exact'],
31+
'name': ['exact'],
32+
33+
'energy': ['exact'],
34+
'protein': ['exact'],
3035
'carbohydrates': ['exact'],
3136
'carbohydrates_sugar': ['exact'],
32-
'created': ['exact', 'gt', 'lt'],
33-
'last_update': ['exact', 'gt', 'lt'],
34-
'energy': ['exact'],
3537
'fat': ['exact'],
3638
'fat_saturated': ['exact'],
3739
'fiber': ['exact'],
38-
'name': ['exact'],
39-
'protein': ['exact'],
4040
'sodium': ['exact'],
41+
42+
'created': ['exact', 'gt', 'lt'],
43+
'last_update': ['exact', 'gt', 'lt'],
44+
'last_imported': ['exact', 'gt', 'lt'],
45+
4146
'language': ['exact'],
4247
'license': ['exact'],
4348
'license_author': ['exact'],

0 commit comments

Comments
 (0)