Skip to content

@lang directive ignored #76

@jvanulde

Description

@jvanulde

I am trying to add some sample data to a Dgraph instance. Here is my code thus far:

p = {}
record = { some JSON document }

p['title@en'] = record['title_translated']['en']
p['title@fr'] = "<" + str(record['title_translated']['fr']) + ">"
p['date_published'] = record['date_published']

assigned = txn.mutate(set_obj=p)

txn.commit()

I get the following error:

Error: <_Rendezvous of RPC that terminated with:
status = StatusCode.UNKNOWN
details = "Attr: [title] should have @lang directive in schema to mutate edge: [entity:1903 attr:"title" value:"Versatile Soil Moisture Budget" value_type:STRING lang:"en" ]"

I have checked the lang checkbox in the schema configuration for the title predicate. Any idea on how I can get this to work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions