Handle duplicates in playlist

This commit is contained in:
Sumner Evans
2020-04-23 14:59:54 -06:00
parent bb26068ac6
commit 678fde3b24
5 changed files with 32 additions and 15 deletions

View File

@@ -138,7 +138,7 @@ class SortedManyToManyField(ManyToManyField):
database = self.model._meta.database
schema = self.model._meta.schema
table_name = '{}_{}_through'.format(*tables)
indexes = (((lhs._meta.name, rhs._meta.name), True), )
indexes = (((lhs._meta.name, rhs._meta.name, 'position'), True), )
params = {'on_delete': self._on_delete, 'on_update': self._on_update}
attrs = {