Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
funkwhale
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Giger
funkwhale
Commits
bdf93479
Verified
Commit
bdf93479
authored
6 years ago
by
Eliot Berriot
Browse files
Options
Downloads
Patches
Plain Diff
Fixed serialization error
parent
64e88b83
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/funkwhale_api/federation/serializers.py
+1
-1
1 addition, 1 deletion
api/funkwhale_api/federation/serializers.py
api/funkwhale_api/federation/views.py
+2
-2
2 additions, 2 deletions
api/funkwhale_api/federation/views.py
with
3 additions
and
3 deletions
api/funkwhale_api/federation/serializers.py
+
1
−
1
View file @
bdf93479
...
...
@@ -239,7 +239,7 @@ class APILibraryCreateSerializer(serializers.ModelSerializer):
return
validated_data
def
create
(
self
,
validated_data
):
library
=
models
.
Library
.
objects
.
get
_or_create
(
library
=
models
.
Library
.
objects
.
update
_or_create
(
url
=
validated_data
[
'
library
'
][
'
id
'
],
defaults
=
{
'
actor
'
:
validated_data
[
'
actor
'
],
...
...
This diff is collapsed.
Click to expand it.
api/funkwhale_api/federation/views.py
+
2
−
2
View file @
bdf93479
...
...
@@ -68,7 +68,7 @@ class InstanceActorViewSet(FederationMixin, viewsets.GenericViewSet):
data
=
handler
(
request
.
data
,
actor
=
request
.
actor
)
except
NotImplementedError
:
return
response
.
Response
(
status
=
405
)
return
response
.
Response
(
data
,
status
=
200
)
return
response
.
Response
(
{}
,
status
=
200
)
@detail_route
(
methods
=
[
'
get
'
,
'
post
'
])
def
outbox
(
self
,
request
,
*
args
,
**
kwargs
):
...
...
@@ -80,7 +80,7 @@ class InstanceActorViewSet(FederationMixin, viewsets.GenericViewSet):
data
=
handler
(
request
.
data
,
actor
=
request
.
actor
)
except
NotImplementedError
:
return
response
.
Response
(
status
=
405
)
return
response
.
Response
(
data
,
status
=
200
)
return
response
.
Response
(
{}
,
status
=
200
)
class
WellKnownViewSet
(
FederationMixin
,
viewsets
.
GenericViewSet
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment