Conditions | 2 |
Total Lines | 7 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # Copyright (c) 2019 Alexander Todorov <[email protected]> |
||
41 | def populate(self, product_id=None): |
||
42 | if product_id: |
||
43 | self.fields['version'].queryset = Version.objects.filter(product_id=product_id) |
||
44 | self.fields['build'].queryset = Build.objects.filter(product_id=product_id) |
||
45 | else: |
||
46 | self.fields['version'].queryset = Version.objects.all() |
||
47 | self.fields['build'].queryset = Build.objects.all() |
||
48 | |||
62 |