Merge pull request #64 from g-plane/master

一些疏漏
This commit is contained in:
printempw 2017-04-29 13:36:21 +08:00 committed by GitHub
commit 6eacd7e378

View File

@ -334,7 +334,7 @@ class AdminController extends Controller
'tid' => 'required|integer' 'tid' => 'required|integer'
]); ]);
if (!Texture::find($request->tid)) if (!Texture::find($request->tid) && $request->tid != 0)
return json(trans('admin.players.textures.non-existent', ['tid' => $request->tid]), 1); return json(trans('admin.players.textures.non-existent', ['tid' => $request->tid]), 1);
$player->setTexture(['tid_'.$request->model => $request->tid]); $player->setTexture(['tid_'.$request->model => $request->tid]);