Small fixes to Liaison Tool changes. Commit ready for merge
- Legacy-Id: 10465
This commit is contained in:
parent
1ea5dcf907
commit
eed28dbb49
|
@ -41,11 +41,11 @@ class LiaisonStatementsFeed(Feed):
|
||||||
# wildcards to make it easier to construct a URL that
|
# wildcards to make it easier to construct a URL that
|
||||||
# matches
|
# matches
|
||||||
search_string = re.sub(r"[^a-zA-Z1-9]", ".", search)
|
search_string = re.sub(r"[^a-zA-Z1-9]", ".", search)
|
||||||
statement = LiaisonStatement.objects.filter(from_name__iregex=search_string).first()
|
statement = LiaisonStatement.objects.filter(from_groups__name__iregex=search_string).first()
|
||||||
if not statement:
|
if not statement:
|
||||||
raise FeedDoesNotExist
|
raise FeedDoesNotExist
|
||||||
|
|
||||||
name = statement.from_name
|
name = statement.from_groups.first().name
|
||||||
obj['filter'] = { 'from_name': name }
|
obj['filter'] = { 'from_name': name }
|
||||||
obj['title'] = u'Liaison Statements from %s' % name
|
obj['title'] = u'Liaison Statements from %s' % name
|
||||||
return obj
|
return obj
|
||||||
|
@ -97,4 +97,4 @@ class LiaisonStatementsFeed(Feed):
|
||||||
return item.submitted
|
return item.submitted
|
||||||
|
|
||||||
def item_author_name(self, item):
|
def item_author_name(self, item):
|
||||||
return item.from_name
|
return item.from_groups.first().name
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
from django.db import models, migrations
|
from django.db import migrations
|
||||||
|
|
||||||
def create_required_tags(apps, schema_editor):
|
def create_required_tags(apps, schema_editor):
|
||||||
LiaisonStatement = apps.get_model("liaisons", "LiaisonStatement")
|
LiaisonStatement = apps.get_model("liaisons", "LiaisonStatement")
|
||||||
|
|
|
@ -1580,6 +1580,16 @@
|
||||||
"model": "name.liaisonstatementeventtypename",
|
"model": "name.liaisonstatementeventtypename",
|
||||||
"pk": "comment"
|
"pk": "comment"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"fields": {
|
||||||
|
"order": 10,
|
||||||
|
"used": true,
|
||||||
|
"name": "Private Comment",
|
||||||
|
"desc": ""
|
||||||
|
},
|
||||||
|
"model": "name.liaisonstatementeventtypename",
|
||||||
|
"pk": "private_comment"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"fields": {
|
"fields": {
|
||||||
"order": 1,
|
"order": 1,
|
||||||
|
|
Loading…
Reference in a new issue