Fixes Scaffold generator with --assets=false

Scaffold generator with --assets=false option 
outputs an error

See #9525
Merge pull request #10448 from arunagw/bug-fix-scaffold-generator-master

Fixes Scaffold generator with --assets=false