Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #4282: Directive migration doesn't handle default values #1044

Conversation

VinceMacBuche
Copy link
Member

@@ -254,8 +250,8 @@ class Section2FieldService(val fieldFactory: DirectiveFieldFactory, val translat
for {
nameValues <- seqOfNameValues
} yield {
val valueOpt = try Some(nameValues.values(i)) catch { case e: Exception => None }
(nameValues.name, valueOpt)
val valueOpt = try Some(nameValues.values(i)) catch { case e: Exception => nameValues.name.constraint.default }
Copy link
Member Author

Choose a reason for hiding this comment

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

I want to try some refactoring here before merging

@VinceMacBuche
Copy link
Member Author

PR updated

@VinceMacBuche VinceMacBuche force-pushed the bug_4282/directive_migration_doesn_t_handle_default_values branch from d52068b to fcf379d Compare February 5, 2016 16:16
@VinceMacBuche VinceMacBuche force-pushed the bug_4282/directive_migration_doesn_t_handle_default_values branch from fcf379d to ae412fe Compare February 8, 2016 22:41
@VinceMacBuche
Copy link
Member Author

PR updated

// A section will be defined as a Map of value by variable name
// * ie: Map(A -> Seq("A1", "A2"), B -> Seq("B1", "B2")) => Seq( Map((A -> "A1"), (B -> "B1"))
// , Map((A -> "A2"), (B -> "B2")) )
// If there is no value, a Section with default value is returned is returned
Copy link
Member

Choose a reason for hiding this comment

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

is returned overflow

@VinceMacBuche
Copy link
Member Author

Closing, replacing by a better idea

@jooooooon
Copy link
Member

See #1046

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants