Skip to content

Commit

Permalink
add uri field to contacts (#2417)
Browse files Browse the repository at this point in the history
store external id in a new field instead of _id so
the validation works for events.

SDCP-661
  • Loading branch information
petrjasek authored Jan 6, 2023
1 parent 3702556 commit 5bdf4a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/contacts/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license

from superdesk.resource import Resource, text_with_keyword
from superdesk.resource import Resource, text_with_keyword, not_analyzed

CONTACTS_PRIVILEDGE = "contacts"
VIEW_CONTACTS = "view_contacts"
Expand All @@ -28,6 +28,8 @@ class ContactsResource(Resource):
# flag to indicate that the contact item should not be publicly visible, for example if the item relates to
# a contact that can not be distributed due to privacy concerns
"public": {"type": "boolean", "default": False},
# global identifier, could be used for external contacts
"uri": {"type": "string", "mapping": {"type": "keyword"}},
"organisation": {
"type": "string",
"required": False,
Expand Down

0 comments on commit 5bdf4a7

Please sign in to comment.