change references to db_subscriptions to reference handler correctly
This commit is contained in:
parent
98ab831437
commit
e1db190329
2 changed files with 3 additions and 3 deletions
|
|
@ -417,7 +417,7 @@ class CmdCBoot(COMMAND_DEFAULT_CLASS):
|
||||||
string = "You don't control this channel."
|
string = "You don't control this channel."
|
||||||
self.msg(string)
|
self.msg(string)
|
||||||
return
|
return
|
||||||
if account not in channel.db_subscriptions.all():
|
if not channel.subscriptions.has(account):
|
||||||
string = "Account %s is not connected to channel %s." % (account.key, channel.key)
|
string = "Account %s is not connected to channel %s." % (account.key, channel.key)
|
||||||
self.msg(string)
|
self.msg(string)
|
||||||
return
|
return
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ class ChannelAdmin(admin.ModelAdmin):
|
||||||
save_on_top = True
|
save_on_top = True
|
||||||
list_select_related = True
|
list_select_related = True
|
||||||
fieldsets = (
|
fieldsets = (
|
||||||
(None, {'fields': (('db_key',), 'db_lock_storage', 'db_subscriptions')}),
|
(None, {'fields': (('db_key',), 'db_lock_storage', 'db_account_subscriptions', 'db_object_subscriptions')}),
|
||||||
)
|
)
|
||||||
|
|
||||||
def subscriptions(self, obj):
|
def subscriptions(self, obj):
|
||||||
|
|
@ -69,7 +69,7 @@ class ChannelAdmin(admin.ModelAdmin):
|
||||||
obj (Channel): The channel to get subs from.
|
obj (Channel): The channel to get subs from.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return ", ".join([str(sub) for sub in obj.db_subscriptions.all()])
|
return ", ".join([str(sub) for sub in obj.subscriptions.all()])
|
||||||
|
|
||||||
def save_model(self, request, obj, form, change):
|
def save_model(self, request, obj, form, change):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue