Hey Arthur,
so instead of all the if/else business, code would look something like this (maybe not 100% accurate didn't try it in the codebase:)
kwargs = { name: name, '{0}__{1}'.format('value', equation): value, content_type_id=content_type_id }
conditions.append(models.Q(id__in=NamedAttribute.objects.filter(**kwargs).values('object_id')))
I may be missing some quotes but you'll figure it out :)
« Back to merge proposal
Hey Arthur,
so instead of all the if/else business, code would look something like this (maybe not 100% accurate didn't try it in the codebase:)
kwargs = { __{1}'. format( 'value' , equation): value, type_id= content_ type_id
name: name,
'{0}
content_
}
conditions. append( models. Q(id__in= NamedAttribute. objects. filter( **kwargs) .values( 'object_ id')))
I may be missing some quotes but you'll figure it out :)