blocksoapp / blocksoapp/monorepo

Edit Profile object manager to create a user on create

Open
#192 1 comment 0 reactions 0 assignees View on GitHub
tech debt
Dominant language
JavaScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

**Current Behavior**
To create a blockso user at the moment, we must do
```
from django.contrib.auth import get_user_model
from blockso_app.models import Profile

UserModel = get_user_model()
user = UserModel.objects.create(ethereum_address="bar")
profile = Profile.objects.create(user=user)
```

**Expected Behavior**
Override Profile's object manager to create the user in the background when a profile is being created.
That way we can just do
```
from blockso_app.models import Profile
profile = Profile.objects.create(ethereum_address="bar")
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the Profile model in blockso_app.models and inspect how its object manager handles create. Confirm the expected Profile.objects.create(ethereum_address="bar") usage and verify that it creates the associated user without requiring a separate UserModel call.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
backend, database
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.