Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hub
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
thomasDOTwtf
hub
Commits
e52bc281
"git@git.cccv.de:voidptr/camp2023-infos.git" did not exist on "94a477a1b77c2240158061b650f5a7d81fbd7fb3"
Commit
e52bc281
authored
4 months ago
by
Andreas Hubel
Browse files
Options
Downloads
Patches
Plain Diff
fix(rooms-api): resolve internal url referenes in (room) links
parent
ad5386b8
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/models/links.py
+2
-2
2 additions, 2 deletions
src/core/models/links.py
src/core/models/rooms.py
+1
-1
1 addition, 1 deletion
src/core/models/rooms.py
with
3 additions
and
3 deletions
src/core/models/links.py
+
2
−
2
View file @
e52bc281
...
@@ -5,7 +5,7 @@ from django.core.validators import URLValidator
...
@@ -5,7 +5,7 @@ from django.core.validators import URLValidator
from
django.db
import
models
from
django.db
import
models
from
django.utils.translation
import
gettext_lazy
as
_
from
django.utils.translation
import
gettext_lazy
as
_
from
core.utils
import
resolve_link
from
core.utils
import
resolve_internal_url
,
resolve_link
class
Link
(
models
.
Model
):
class
Link
(
models
.
Model
):
...
@@ -67,7 +67,7 @@ class Link(models.Model):
...
@@ -67,7 +67,7 @@ class Link(models.Model):
'
type
'
:
self
.
link_type
,
'
type
'
:
self
.
link_type
,
'
name
'
:
self
.
name
,
'
name
'
:
self
.
name
,
'
uri
'
:
self
.
link
,
'
uri
'
:
self
.
link
,
'
url
'
:
self
.
link
,
'
url
'
:
resolve_internal_url
(
self
.
link
)
,
}
}
def
__str__
(
self
)
->
str
:
def
__str__
(
self
)
->
str
:
...
...
This diff is collapsed.
Click to expand it.
src/core/models/rooms.py
+
1
−
1
View file @
e52bc281
...
@@ -511,7 +511,7 @@ class RoomLink(models.Model):
...
@@ -511,7 +511,7 @@ class RoomLink(models.Model):
'
type
'
:
self
.
link_type
,
'
type
'
:
self
.
link_type
,
'
name
'
:
self
.
name
,
'
name
'
:
self
.
name
,
'
uri
'
:
self
.
link
,
'
uri
'
:
self
.
link
,
'
url
'
:
self
.
link
,
# TODO rendered URL without local hub specific prefixes
'
url
'
:
resolve_internal_url
(
self
.
link
),
}
}
def
__str__
(
self
):
def
__str__
(
self
):
...
...
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