Add user association to a rover#74
Conversation
|
|
||
|
|
||
| class RoverSerializer(serializers.HyperlinkedModelSerializer): | ||
| class RoverSerializer(serializers.ModelSerializer): |
There was a problem hiding this comment.
I'm reading about the differences between these two. The HyperlinkedModelSerializer does not lend itself to use with a foreign key?
There was a problem hiding this comment.
The issue I was running into was that the User model didn't have a serializer. If we eventually want to implement that we can put this back. It just didn't seem all that important.
|
I went to https://beta.rovercode.com/mission-control/rovers/ to delete the rovers before we merge this PR. But, I'm getting a |
|
I wouldn't have expected an issue. Everything is still running locally for me. The only change to the model recently was adding the pin assignment fields which was a migration. |
|
Huh, interesting. And actually, there shouldn't be any |
|
I'll go ahead an merge this PR and see where we end up. |
Related to #19 in order to modify the user's rovers. Changes
ownerto be an actual user. There's no easy migration from a string to a foreign key, so theRoverobjects will all need to be removed when the migrations are applied.