Skip to content

Commit

Permalink
Cleanup: reuse relative path function
Browse files Browse the repository at this point in the history
  • Loading branch information
julen committed Jan 21, 2016
1 parent f73100e commit 66ec141
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pootle/apps/pootle_project/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
from pootle.core.cache import make_method_key
from pootle.core.mixins import CachedTreeItem
from pootle.core.models import VirtualResource
from pootle.core.url_helpers import (
get_editor_filter, get_path_sortkey, split_pootle_path)
from pootle.core.url_helpers import (get_editor_filter, get_path_sortkey,
split_pootle_path, to_tp_relative_path)
from pootle_app.models.directory import Directory
from pootle_app.models.permissions import PermissionSet
from pootle_store.filetypes import factory_classes
Expand Down Expand Up @@ -318,7 +318,7 @@ def resources(self):
if 'virtualfolder' in settings.INSTALLED_APPS
else [])
resources = sorted(
{"/".join(pootle_path.split("/")[3:])
{to_tp_relative_path(pootle_path)
for pootle_path
in (set(stores.values_list("pootle_path", flat=True))
| set(dirs.values_list("pootle_path", flat=True))
Expand Down

0 comments on commit 66ec141

Please sign in to comment.