Skip to content

Check for NodeRevision in ast cache before pulling attributes#2048

Merged
shangyian merged 1 commit intomainfrom
2047-noderevision-object-has-no-attribute-current
Apr 23, 2026
Merged

Check for NodeRevision in ast cache before pulling attributes#2048
shangyian merged 1 commit intomainfrom
2047-noderevision-object-has-no-attribute-current

Conversation

@jlhester
Copy link
Copy Markdown
Collaborator

Summary

Some metrics using old style SQL generation will hit an edge case where a NodeRevision is added to the dj AST cache rather than a Node object. This change checks for either object type in the cache.

Test Plan

Updated unit tests and verified the error was fixed in a local instance of the DJ server

  • PR has an associated issue: #
  • make check passes
  • make test shows 100% unit test coverage

Deployment Plan

@jlhester jlhester linked an issue Apr 23, 2026 that may be closed by this pull request
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 23, 2026

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit a8d1746
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/69ea8a05aeba87000800a276

@jlhester jlhester force-pushed the 2047-noderevision-object-has-no-attribute-current branch from e334f84 to 41fba2e Compare April 23, 2026 21:01
@jlhester jlhester force-pushed the 2047-noderevision-object-has-no-attribute-current branch from 41fba2e to a8d1746 Compare April 23, 2026 21:07
@jlhester jlhester marked this pull request as ready for review April 23, 2026 21:08
@jlhester jlhester requested a review from shangyian April 23, 2026 21:08
@shangyian shangyian merged commit c0dedff into main Apr 23, 2026
25 checks passed
@shangyian shangyian deleted the 2047-noderevision-object-has-no-attribute-current branch April 23, 2026 22:26
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.

'NodeRevision' object has no attribute 'current'

2 participants