:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(tasks): allow editing PostHog Code invite code value in admin (#58008)
Joshua Snyder8e38549f22ec
diff --git a/products/tasks/backend/admin.py b/products/tasks/backend/admin.pyindex 52189e948784..c5a5ac48053d 100644--- a/products/tasks/backend/admin.py+++ b/products/tasks/backend/admin.py@@ -72,14 +72,8 @@ class CodeInviteAdmin(admin.ModelAdmin):autocomplete_fields = ("created_by",)inlines = []- def get_readonly_fields(self, request, obj=None):- if obj:- return ("id", "code", "redemption_count", "created_at")- return ("id", "redemption_count", "created_at")-def get_fieldsets(self, request, obj=None):if obj:- # Show auto-generated code as readonly on existing recordsreturn ((None, {"fields": ("id", "code", "description")}),("Limits", {"fields": ("is_active", "max_redemptions", "redemption_count", "expires_at")}),