Hi, I’m using this code do print data from two linked tables, Projects and ProjectGroups:
def myFunc():
projects = [item for item in app_tables.projects.client_writable_cascade().search()
if item['Costs']>100]
return projects
# ...
projects = myFunc()
if projects:
for p in projects:
print(p['ProjectName'])
print(p['ProjectGroup']['GroupName']) <-- error
print(p['Owner']['Name']) <-- error
print(p['Costs'])
I’m getting strange TypeError: 'NoneType' object has no attribute '__getitem__' error
. Interestingly, the data gets printed out, like:
1st project
First group
John
999.0
2nd project
First group
Michael
135.2
and right after that the output window shows the error message, related to the rows I denoted above. These rows are dealing with linked tables.
I’d appreciate any ideas …