title: Django query filter with contains and empty list variable
body: <p><code>matched = Details.objects.filter(Q(cnp=cnp) | Q(phones__contains=[phone]) | Q(emails__contains=[email])).values('id')</code></p>
  <pre><code>class Details(models.Model):
  
      ...
      cnp = models.CharField(max_length=24, blank=True)
      phones = ArrayField(models.CharField(max_length=50), size=20, blank=True, default=list)
      emails = ArrayField(models.EmailField(), size=20, blank=True, default=list)
  </code></pre>
  <p>Hello!</p>
  <p>I want to make a query and if any of the fields(cnp,phones or emails) have a match to get the result queryset.
  The cnp, phone and email variable will get just one value that I need to match with one or more values from the ArrayField.
  I made the query above using Q but the problem is that I can have empty list/string for phone or email variable and then that matches all my database.
  If i don't use 'contains', I can match single valued lists(from the db ArrayField) but for example if I have multiple emails in the db I need to match it with 'contains' to get a result.
  Is this possible only from a django query?
  Thanks!</p>