Skip to content

Create defensive check for staging_tree to ensure we don't trigger an error #3380

@sentry

Description

@sentry

Sentry Issue: STUDIO-F4S

AttributeError: 'NoneType' object has no attribute 'tree_id'
(10 additional frame(s) were not displayed)
...
  File "rest_framework/views.py", line 506, in dispatch
    response = handler(request, *args, **kwargs)
  File "rest_framework/decorators.py", line 50, in handler
    return func(*args, **kwargs)
  File "contentcuration/views/base.py", line 326, in activate_channel_endpoint
    change = activate_channel(channel, request.user)
  File "contentcuration/api.py", line 74, in activate_channel
    user.check_channel_space(channel)
  File "contentcuration/models.py", line 238, in check_channel_space
    staging_tree_id = channel.staging_tree.tree_id

Metadata

Metadata

Assignees

Labels

P2 - normalPriority: Nice to have

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions