Skip to content

Commit

Permalink
Proper ordering of record arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
sebzur committed Oct 27, 2012
1 parent 58bb13f commit bead2ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion synergy/contrib/records/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class CreateRecordView(ProtectedView, RegionViewMixin, ObjectViewMixin, CreateVi
def dispatch(self, request, *args, **kwargs):
setup = get_model('records', 'RecordSetup').objects.get(name=kwargs.get('name'))
expressions = []
for argument in setup.arguments.all():
for argument in setup.arguments.all().order_by('weight'):
expressions.append("(?P<%s>%s)" % (argument.name, argument.regex))
regex = "/".join(expressions)
path = kwargs.get('arguments')
Expand Down

0 comments on commit bead2ba

Please sign in to comment.