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

Panic in Publicize when using Hash(Integer, PayloadType) #1060

Closed
luna-duclos opened this issue Feb 21, 2017 · 0 comments
Closed

Panic in Publicize when using Hash(Integer, PayloadType) #1060

luna-duclos opened this issue Feb 21, 2017 · 0 comments
Labels

Comments

@luna-duclos
Copy link

When using a Hash(Integer, PayloadType) goa generates a map[int]*PayloadType, which is correct.
However, in the Publicize function of the generated code in user_types.go, the following is generated:

	if ut.Triggers != nil {
		pub.Triggers = make(map[int]*GameengineAchievementTriggerPayload, len(ut.Triggers))
		for k2, v2 := range ut.Triggers {
			pubk2 := k2
			pubv2 := v2.Publicize()
			pub.Triggers[pubk2] = pubv2
		}
	}

This causes a panic if the client sends a null value for v2

@luna-duclos luna-duclos changed the title Panic in Publicize when using Hash(Integer, MediaType) Panic in Publicize when using Hash(Integer, PayloadType) Feb 21, 2017
@raphael raphael added the bug label Feb 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants