Skip to content

Conversation

@Neoares
Copy link

@Neoares Neoares commented Dec 22, 2015

When you store the parent ad unit on the variable root_ad_unit (line 55), you are actually storing an array of size 1 which contains the ad unit. That causes the code to fail at line 74 (if root_ad_unit['id'] in ad_unit_tree:), because root_ad_unit is not the object itself, is the array of size 1 containing the object.

To prevent that, I've added a [0] at line 55 so you are storing the object instead an array.

When you store the parent ad unit on the variable "root_ad_unit" (line 55), you are actually storing an array of size 1 which contains the ad unit. That causes the code to fail at line 74 ("if root_ad_unit['id'] in ad_unit_tree:"), because "root_ad_unit" is not the object itself, is the array of size 1 containing the object.

To prevent that, I've added a [0] at line 55 so you are storing the object instead an array.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants