Skip to content

Commit

Permalink
fix: fix breaking change introduced in 59eadbc
Browse files Browse the repository at this point in the history
  • Loading branch information
open-dynaMIX committed Oct 28, 2022
1 parent 4da725d commit 34be9bf
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Migration(migrations.Migration):
operations = [
migrations.AlterModelOptions(
name="analyticsfield",
options={"ordering": ["sort", "alias"]},
options={"ordering": ["sort", "-created_at"]},
),
migrations.AddField(
model_name="analyticsfield",
Expand Down
2 changes: 1 addition & 1 deletion caluma/caluma_analytics/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def __repr__(self):
return f"AnalyticsField<{self.table.slug}.{self.alias}>"

class Meta:
ordering = ["sort", "alias"]
ordering = ["sort", "-created_at"]
constraints = [
UniqueConstraint(
name="unique_data_source",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@
}),
dict({
'node': dict({
'alias': 'foo',
'value': 'bar',
'alias': 'quarter',
'value': '4',
}),
}),
dict({
'node': dict({
'alias': 'quarter',
'value': '4',
'alias': 'foo',
'value': 'bar',
}),
}),
dict({
Expand Down
16 changes: 8 additions & 8 deletions caluma/caluma_analytics/tests/__snapshots__/test_table.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@
'edges': list([
dict({
'node': dict({
'alias': 'existing',
'dataSource': 'meta.foobar',
'alias': 'quarter',
'dataSource': 'created_at.quarter',
}),
}),
dict({
'node': dict({
'alias': 'quarter',
'dataSource': 'created_at.quarter',
'alias': 'existing',
'dataSource': 'meta.foobar',
}),
}),
]),
Expand All @@ -89,14 +89,14 @@
'edges': list([
dict({
'node': dict({
'alias': 'existing',
'dataSource': 'meta.foobar',
'alias': 'foobar',
'dataSource': 'meta.baz',
}),
}),
dict({
'node': dict({
'alias': 'foobar',
'dataSource': 'meta.baz',
'alias': 'existing',
'dataSource': 'meta.foobar',
}),
}),
]),
Expand Down

0 comments on commit 34be9bf

Please sign in to comment.