File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/ResourceManager/Sql/Commands.Sql/Database/Cmdlet Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -122,9 +122,11 @@ protected override IEnumerable<AzureSqlDatabaseModel> PersistChanges(IEnumerable
122
122
{
123
123
response = ModelAdapter . UpsertDatabase ( this . ResourceGroupName , this . ServerName , entity . First ( ) ) ;
124
124
}
125
- catch ( ArgumentNullException ex )
125
+ catch ( ArgumentNullException ex )
126
126
{
127
- if ( ex . ParamName == "operationStatusLink" )
127
+ // This is needed because on v11 servers the call to update database will return synchronously if the operation finishes quickly
128
+ // whereas for v12 servers it is always async. If the call retuns synchronously the operationStatusLink will be null.
129
+ if ( ex . ParamName == "operationStatusLink" )
128
130
{
129
131
response = ModelAdapter . GetDatabase ( this . ResourceGroupName , this . ServerName , entity . First ( ) . DatabaseName ) ;
130
132
}
You can’t perform that action at this time.
0 commit comments