Changes between Initial Version and Version 1 of Ticket #29697


Ignore:
Timestamp:
Aug 22, 2018, 8:35:57 AM (6 years ago)
Author:
Tim Graham
Comment:

Reproduced at 50b8493581fea3d7137dd8db33bac7008868d23a.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #29697

    • Property Triage Stage UnreviewedAccepted
    • Property Summary Missing FROM-clause entry for tableComplex query crashes with "missing FROM-clause entry for table"
  • Ticket #29697 – Description

    initial v1  
    55
    66{{{
     7from django.db import models
     8from django.contrib.postgres.fields import JSONField
     9
     10class Company(models.Model):
     11   ...
     12
    713class Status(models.Model):
    814    ...
    915    company = models.ForeignKey(
    10         'customauth.Company',
     16        Company,
    1117        on_delete=models.CASCADE)
    1218    key = models.SlugField(max_length=255)
     
    1622    ...
    1723    company = models.ForeignKey(
    18         'customauth.Company',
     24        Company,
    1925        on_delete=models.CASCADE,
    2026        related_name='employees',
    2127        db_index=True)
    22     permissions = postgres.fields.JSONField(blank=True, default=list)
     28    permissions = JSONField(blank=True, default=list)
    2329    is_superuser = models.BooleanField(default=False)
    2430    ...
    2531
    26 class Company(models.Model):
    27    ...
    2832}}}
    2933
     
    3135
    3236{{{
     37from django.db.models import Q, Value
     38from django.db.models.functions import Concat
     39
    3340Status.objects.filter(
    3441    Q(company__employees__is_superuser=True) |
Back to Top