Skip to content

Commit

Permalink
Merge pull request #3541 from romcheg/service_env_alphabetically
Browse files Browse the repository at this point in the history
Order service environments alphabetically
  • Loading branch information
romcheg committed Jun 17, 2020
2 parents ca14138 + d0b2db0 commit efaf42e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/ralph/assets/migrations/0030_auto_20200528_1301.py
@@ -0,0 +1,18 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('assets', '0029_asset_start_usage'),
]

operations = [
migrations.AlterModelOptions(
name='serviceenvironment',
options={'ordering': ('service__name', 'environment__name')},
),
]
1 change: 1 addition & 0 deletions src/ralph/assets/models/assets.py
Expand Up @@ -116,6 +116,7 @@ def __str__(self):

class Meta:
unique_together = ('service', 'environment')
ordering = ('service__name', 'environment__name')

@property
def service_name(self):
Expand Down

0 comments on commit efaf42e

Please sign in to comment.