pyramid-jsonapi
pyramid-jsonapi copied to clipboard
Ignored columns are not ignored when included through &include=true
Hidden columns (through adding .info.update({'pyramid_jsonapi': {'visible': False}}) to the model) are not properly hidden if a relation exists to another model with hidden columns.
Reproduction:
Create two models: class One(Base): id = Column(Integer, primary_key=True) twoId = Column(Integer, ForeignKey('two.id') hiddenColumn = Column(Text) hiddenColumn.info.update({'pyramid_jsonapi': {'visible': False}})
class Two(Base): id = Column(Integer, primary_key=True) oneId = Column(Integer, ForeignKey('one.id') hiddenColumn = Column(Text) hiddenColumn.info.update({'pyramid_jsonapi': {'visible': False}})
Fill with appropriate data. Access One through the endpoint and add &include=two to query to include data from Two. hiddenColumn data from Two will be included even though it is hidden.
Noted and good catch.
I can see where this would happen. I'll see if I can fix it soon (conferencing today though so probably next week).
Any update on this issue?