Skip to content

Conversation

@benmoss
Copy link
Contributor

@benmoss benmoss commented Jan 5, 2014

As it stands now the friends rule is returning the actor themselves as a friend, since I believe they can satisfy both p1 and p2. I added a clause that p1 != p2, I think that's all that's necessary to fix it. I also changed the default person to Sigourney Weaver so the mistake would be checked for when running the query.

Seems like this bug could also exist if there were some Woody Allen movies in your database (actor and director), but doesn't seem to exist so I'm not gonna worry about that one 😄

Awesome use of edn for this, super easy to understand.

screen shot 2014-01-05 at 6 22 45 pm

jonase added a commit that referenced this pull request Jan 6, 2014
Prevent the friend rule from allowing an actor to be their own friend
@jonase jonase merged commit b6fa11d into jonase:master Jan 6, 2014
@benmoss benmoss deleted the prevent-self-friendship branch January 6, 2014 15:06
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