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

[Bug]: When creating new segment always getting null exception. #43

Open
1 task done
mozbayrak opened this issue Dec 12, 2023 · 0 comments
Open
1 task done

[Bug]: When creating new segment always getting null exception. #43

mozbayrak opened this issue Dec 12, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@mozbayrak
Copy link

mozbayrak commented Dec 12, 2023

What happened?

Although I set name property of segment I getting null exception.

My code is below:

        public void CreateSegment(string segmentName)
        {
            Segment newSegment = new()
            {
                Name = segmentName
            };
            var filterItem = new FilterExpressions(new Filter(field: "user_tag", relation: Filter.RelationEnum.Equal, value: segmentName));
            newSegment.Filters.Add(filterItem);

            _appInstance.CreateSegments(appId: _appId, segment: newSegment);
        }

SS attachment

![one_signal_create_segment](https://github.com/OneSignal/onesignal-dotnet-api/assets/105269510/e629b655-aed8-43fd-be58-d9cac4c5b004)

Steps to reproduce?

1. Installed RestSharp v108.0.3
2. Installed OneSignal Api v2.0.2

What did you expect to happen?

I expected to create new segment

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@mozbayrak mozbayrak added the bug Something isn't working label Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant