oliver-zehentleitner / maity

hub: one open-join clause (routes/joins._open_joins in a domain module, four inline copies)

Sign in to report

tsk-tmqxrvj8aj8q Proposed

Audit round 6 (tsk-hgnbapyw7hnh), read at 046a4d3b. Kind: duplication.

What is wrong

  • "A join that is open now" (used, burned and revoked all null, expires_at in the future) has a helper, routes/joins._open_joins (routes/joins.py:416-424), but it lives in a route module and is private.
  • Inline copies: member_agents.agents_held (member_agents.py:29-36, new), outsiders.listing (outsiders.py:160-166, new), project_roles.py:155-158, and routes/joins.py:1564-1567 in the same module as the helper.

Proposal

  • Move the clause to a domain module (e.g. member_agents.open_joins()) and use it at all five places.

Effort / risk: S. Low.