Fix network profile create in database

Add explicit flush while creating network profiles.

Change-Id: Ie99719a41d582215acd560f1f362333077829ca7