Skip to content

Fix diagram issue when node has no primary keys#645

Merged
dimitri-yatsenko merged 2 commits intodatajoint:devfrom
guzman-raphael:dev
Aug 30, 2019
Merged

Fix diagram issue when node has no primary keys#645
dimitri-yatsenko merged 2 commits intodatajoint:devfrom
guzman-raphael:dev

Conversation

@guzman-raphael
Copy link
Copy Markdown
Collaborator

@guzman-raphael guzman-raphael commented Aug 30, 2019

Fix #643

Comment thread datajoint/diagram.py Outdated
foreign_attributes = set(attr for p in self.in_edges(name, data=True) for attr in p[2]['attr_map'])
self.node[name]['distinguished'] = foreign_attributes < self.node[name]['primary_key']
self.node[name]['distinguished'] = (foreign_attributes < self.node[name]['primary_key']
if ('primary_key' in self.node[name].keys()) else False)
Copy link
Copy Markdown
Member

@dimitri-yatsenko dimitri-yatsenko Aug 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

                self.node[name]['distinguished'] = 'primary_key' in self.node[name] and foreign_attributes < self.node[name]['primary_key']

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit updated

@dimitri-yatsenko dimitri-yatsenko merged commit 74dfe41 into datajoint:dev Aug 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants