Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Membership drops the TimeStamped ordering its siblings keep

Open Beginner friendly
#335 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
django, python
Domain
backend, database

Research direction

Start with accounts/models.py around line 83 and compare Membership.Meta with abstract/models.py lines 31-34, then inspect callers of Membership querysets for ordering assumptions. Done means Membership has the same timestamp ordering and latest behavior as its sibling TimeStamped models, with affected callers checked.

Written by the indexing model from the issue text.

Description

bug side quest

Membership drops the ordering that every other TimeStamped model keeps. Membership.objects.latest() raises as a result.

Work reference: branch codingjoe-weekly-digest, commits 2ace45d2 to 6f28eacf, weekly sending digest (superJoe crew, out of scope for that change).

side quest: accounts.models.Membership.Meta does not inherit TimeStamped.Meta, so Membership silently drops the modified_at/created_at ordering and get_latest_by that every sibling model keeps. [accounts/models.py]:L83

abstract.models.TimeStamped.Meta sets ordering = ("-modified_at", "-created_at") and get_latest_by = "created_at" (abstract/models.py:31-34). Membership.Meta declares only the unique constraint. The model therefore has no default ordering, while every other TimeStamped child inherits one. Membership.objects.latest() raises.

The change is one line, but it alters the ordering of any unordered membership queryset. It needs a check of its callers, not a drive-by fix.

Dominant language
Python
Stars
4
Forks
0
Avg merge
2h 40m
Merged PRs (30d)
163

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from codingjoe/relay

All issues in codingjoe/relay

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.