Skip to content

Conversation

@mitchelljkotler
Copy link
Member

@mitchelljkotler mitchelljkotler commented Dec 23, 2025

These are the same changes as the MuckRock repo, except for premium credits instead of requests. Also, some of the code is in the library squarelet-auth which DocumentCloud uses but MuckRock does not for historical reasons

  • Organizations now track parents, members and share resources. These are set on Accounts and are set via the API
  • When calculating how many credits an organization has left, or is using, credits from parents which have sharing enabled will be added in. The order is your own monthly credits, your own non-monthly credits, parent's monthly credits, parent's non-monthly credits, group's monthly credits, group's non-monthly credits

@mitchelljkotler mitchelljkotler marked this pull request as ready for review January 6, 2026 19:15
# set relationships
if data.get("parent"):
self.parent = Organization.objects.filter(uuid=data["parent"]).first()

Copy link
Member

@allanlasser allanlasser Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, can we expect an Organization to have already been created in the local DB for each parent/group? I don't see the same pull_data logic as in muckrock/muckrock.

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